asp.net.ph

Skip Navigation Links

Atomic Zero-Width Assertions

Regular Expressions Language Elements


The metacharacters described in the following table do not cause the engine to advance through the string or consume characters. They simply cause a match to succeed or fail depending on the current position in the string. For instance, ^ specifies that the current position is at the beginning of a line or string. So the regular expression ^FTP returns only those occurrences of the character string "FTP" that occur at the beginning of a line.

Assertion Description
^ Specifies that the match must occur at the beginning of the string, or beginning of the line. For more information, see the m option in Regular Expression Options.
$ Specifies that the match must occur at the end of the string or before \n at the end of the string, or end of the line. For more information, see the m option in Regular Expression Options.
\A Specifies that the match must occur at the beginning of the string ( ignores the m option ).
\Z Specifies that the match must occur at the end of the string or before \n at the end of the string ( ignores the m option ).
\z Specifies that the match must occur at the end of the string ( ignores the m option ).
\G Specifies that the match must occur at the point at which the current search started ( often, this is one character beyond where the last search ended ). For example, consider a concatenated string composed of discrete groups of characters, where each group is n characters in length. When searching for a match within each group of characters, the regular expression is successful when it finds a match at the character positions 0, n, 2n, 3n, and so on. Matches are successful only when they occur on a positional group boundary.
\b Specifies that the match must occur on a boundary between \w ( alphanumeric ) and \W ( nonalphanumeric ) characters. The match must occur on word boundaries—at the first or last characters in words separated by spaces.
\B Specifies that the match must not occur on a \b boundary.

See Also

ASP.NET Page Syntax



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note