(Created page with "<seo title="Regular Expressions Matching Newline | vEdit" description="Regular expressions cannot match the newline sequences at the end of a line, the expression “[^a]”...")
 
(Related Resources)
 
Line 15: Line 15:
  
 
==Related Resources==
 
==Related Resources==
 +
*[[Regular_Expressions|Regular Expressions Overview]]
 +
*[[Regular_Expressions_Basics|Regular Expressions Basics]]
 +
*[[Special_Matching_Characters|Special Matching Characters]]
 +
*[[Special_Matching_Characters#The_OR_Operator|The “OR” Operator]]
 +
*[[Groups_Replacement_Strings|Groups and Replacement Strings]]
 +
*[[Groups_Replacement_Strings#Groups_and_Replacement_Examples|Groups and Replacement Examples]]
 +
*[[Maximize_Regular_Expression|Maximize Regular Expression Matching]]

Latest revision as of 22:53, 6 February 2017


Regular expressions CANNOT match “newline” sequences at the end of a line. Therefore, the expression [^a] matches any character, except for “a” and a “newline” (single Line-Feed or Carriage-Return and Line-Feed). Similarly, the *, + and ? operators stop matching when they reach the “newline” characters.

[\h00-\h1f]
Matches any control characters, except “newline”.
a.*
Matches the letter “a” and all following characters up to, but not including, the “newline” characters.

The only exception to this is “\N” which explicitly matches the “newline” character(s).

end\Nbegin
Match “end” at the end of a line, followed by “begin” at the beginning of the next line.

Related Resources