Remove the top line of a text file or variable

Thanks for the feedback.

You can streamline the regex like this:

^.*\R

The \R also catches any Line Feed (LF aka \n) and any Carriage Return (CR aka \r), and any weird combination of those (CRLF) or other types of line breaks, and the expression is shorter.

Works also outside of KM (ICU), if the regex flavour is Perlish (PCRE and similar).

1 Like