Nov 10, 2018

Perl Extensions For Regular Expression

Perl Extensions For Regular Expression

Regular Expression
ClassTypeMeaning
\tCharacter Settab
\nCharacter Setnewline
\rCharacter Setreturn
\fCharacter Setform
\aCharacter Setalarm
\eCharacter Setescape
\033Character Setoctal
\x1BCharacter Sethex
\c[Character Setcontrol
\lCharacter Setlowercase
\uCharacter Setuppercase
\LCharacter Setlowercase
\UCharacter Setuppercase
\ECharacter Setend
\QCharacter Setquote
\wCharacter SetMatch a "word" character
\WCharacter SetMatch a non-word character
\sCharacter SetMatch a whitespace character
\SCharacter SetMatch a non-whitespace character
\dCharacter SetMatch a digit character
\DCharacter SetMatch a non-digit character
\bAnchorMatch a word boundary
\BAnchorMatch a non-(word boundary)
\AAnchorMatch only at beginning of string
\ZAnchorMatch only at EOS, or before newline
\zAnchorMatch only at end of string
\GAnchorMatch only where previous m//g left off