Regex - Select the first line on file

A place to try and solve your RegEx problems.
Post Reply
me_suzy
Posts: 20
Joined: Thu Jul 14, 2016 11:31 am

Regex - Select the first line on file

Post by me_suzy »

hi. I am wondering, how to select the first line on file ?

This will select the last line ^(.*)$\z

But the first line?
User avatar
DigitalVolcano
Site Admin
Posts: 1717
Joined: Thu Jun 09, 2011 10:04 am

Re: Regex - Select the first line on file

Post by DigitalVolcano »

Does this do it:

Code: Select all

^(.*)
Options: Multi-line anchors:Off, Dot matches newline:Off
Post Reply