Programming
Memory App
Regex



Shorthands






Backspace \b

In Perl regex, \b normaly matches a word boundary, but withing a character class it matches a backspace.

Generic whitespace \s

Is a shorthand for a whole character class that matches any whitespace character. This includes space, tab, newline, and carriage return.

Modifiers

The add i in m/../i instructs Perl to do the match in a case-insensitive manner. It's not acctualy part of the regex, but part of the m/../ syntatic packaging.

Shorthands

Among the more useful shorthands that Perl provide are: \t a tab character \n a newline character \r a carriage-return character \s any whitespace character (space, tab, newline) \S anything not s \w [a-zA-Z0-9_]+ match a word with w+ \W [^a-zA-Z0-9_]+ anything not w \d [0-9] a digit \D [^0-9] anything not d
Comments
Comments ...