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

A place to try and solve your RegEx problems.
Post Reply
PiotrMP006
Posts: 3
Joined: Tue Jul 04, 2023 9:42 am

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

Post 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
Post Reply