Remove x no. of rows from Notepad

@skg_161125 - Since X is a variable here… you have to give as shown below…

image

So in your case,

 System.Text.RegularExpressions.Regex.Replace(Input_String,"^(.*\n){"+x+"}","")

Hope this helps…

Note: If you want to use the shorter version , like regex.replace, regex.match please import system.text.regularexpressions in the import tab.

image

1 Like