Page 1 of 1

How to insert a space at the beginning of a line in a "for next" code loop (.NET regular expressions)

Posted: Tue Jul 04, 2023 9:43 am
by PiotrMP006
How to insert a space at the beginning of a line in a "for next" code loop (.NET regular expressions)

I am trying to add spaces at the beginning of lines matched with look arounds

Code: Select all

for
line of code
line of code
line of code
line of code
next
and this is the output I want to get

Code: Select all

for
  line of code
  line of code
  line of code
  line of code
next
Please help me with .NET regular expressions