top of page

regex from head on and from behind

It’s well known that putting a caret in front of a regular expression search will limit results to strings found at the beginning of each line.

... and adding a dollar sign at the end will restrict the results to searched for strings at the end of each line.

If you want the regex search to find results from the beginning or end of every line start with (?m):

bottom of page