For instance, I have a sourceString
:
1234\n\n\n\n5678
and, I want to replace the first 2 \n
within a \n
sequence that must be equal to or more than 2 characters
so, the result I expect goes
:
1234TEST\n\n5678
I tried
:
(^|[^\n])\n{2}
and the actual result is: 123TEST\n\n5678
What's wrong with my code?
The basic idea is from @Tim Pietzcker 's tutorial on my previous question.
Thanks.
Regex to match single new line. Regex to match double new line