I read on forum and search engines, but I didn't find a solution.
I need to substitute in a text like this:
Code: Select all
# Title 1
Some text, very long...
# Title 2
Some other text, very long...
...
Code: Select all
<h1># Title 1</h1>
Some text, very long...
<h1>#Title 2</h1>
Some other text, very long...
...
I can't use neither matchText(), because I don't know how many replace I need.
I only know that a good regex for my seach is:
Code: Select all
(\n|^)#.*\n