Can you help me please with a simple regex replace script?
I have a multiline text in a text file. I want to convert this to a single line text. Then I want to search for specific regex and replace them with specific reference inside the matched regex. For example to match ‘test(.+?)test’ and replace with ‘\1’.
But I want the search for the regex to start at the beginning of the string and as it moves along the script to match and replace accordingly, one after the other match.
How can I do that?
And how can I specify multiple regex ‘match and replace’ pairs?