Mega Code Archive

 
Categories / Perl / Regular Expression
 

Anchoring Metacharacters

Metacharacter   What It Matches ^               Matches to beginning of line or beginning of string $               Matches to end of line or end of a string \A              Matches the beginning of the string only \Z              Matches the end of the string or line \z              Matches the end of string only \G              Matches where previous m//g left off \b              Matches a word boundary (when not inside [ ]) \B              Matches a nonword boundary