|
|
Browse by Tags
All Tags » regex » subsequent matching
-
I ran into an interesting situation where back references overwrite previous changes in a regular expression.
I needed a regular expression that updated a pattern but also checked for something that comes before the pattern. It should leave everything before the pattern as it was before the updates. There can be multiple matches of ...
-
ash_enigma:hi, Is there any way in which i can identify whether a regular expression pattern appearing only on subsequent lines?
Yes, I believe there is.
I came up with this solution. I used this as my sample data
# text line 1
# text line 2
text line 3
# text line 4
# text line 5
And this regex on the sample ...
|
|
|