I want to match the start of line character only in certain portion of the text. Example text:
start of text
line 1
line 2
line 3
line 4
stop matching after this
line 5
line 6
line 7
And this is the substitution and output I am looking for:
start of text
line 1
line 2
line 3
line 4
stop matching after this
line 5
line 6
line 7
So, I want to match spaces at the start of line, only till I hit the line -
stop matching after this
All I was able to do so far is (^\s+), but this matched all spaces at the start of line.
regex101 has my attempt and the testing data.
I am using this in Python.