regular-expressions-cheat-sheet-v1

regular-expressions-cheat-sheet-v1 - Metacharacters (must...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Metacharacters (must be escaped) ^ $ ( ) < . * + ? [ { \ | > Escape Character \ Escape Character Quantifiers * + ? {3} {3,} {3,5} 0 or more 1 or more 0 or 1 Exactly 3 3 or more 3, 4 or 5 Quantifier Modifiers "x" below represents a quantifier x? Ungreedy version of "x" Anchors ^ \A $ \Z \b \B \< \> Start of string Start of string End of string End of string Word boundary Not word boundary Start of word End of word POSIX [:upper:] [:lower:] [:alpha:] [:alnum:] [:digit:] [:xdigit:] [:punct:] [:blank:] [:space:] [:cntrl:] [:graph:] [:print:] [:word:] Upper case letters Lower case letters All letters Digits and letters Digits Hexadecimal digits Punctuation Space and tab Blank characters Control characters Printed characters Printed characters and spaces Digits, letters and underscore Character Classes \c \s \S \d \D \w \W \x \O Control character White space Not white space Digit Not digit Word Not word Hexadecimal digit Octal digit Special Characters \n \r \t \v \f \xxx \xhh New line Carriage return Tab Vertical tab Form feed Octal character xxx Hex character hh Pattern Modifiers g i m s x e U Global match Case-insensitive
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/10/2010 for the course CSC CSC209 taught by Professor Kante during the Spring '10 term at University of Toronto- Toronto.

Ask a homework question - tutors are online