Why does ^.*$ does not match a line in:
This is some sample text
this is another line
this is the third line
how can I create a regular expression that will match an entire line so that when finding the next match it will return me the next line.
In other words I will like to have a regex so that the first match = This is some sample text , next match = this is another line etc…
^and$match on the entire input sequence. You need to use the Multiline Regex option to match individual lines within the text.See here for an explanation of the regex options. Here’s what it says about the Multiline option: