regex cards - powerpoint format

30
/pattern/options Regex syntax

Upload: adam-lowe

Post on 11-Jul-2015

1.187 views

Category:

Technology


3 download

TRANSCRIPT

Page 1: Regex Cards - Powerpoint Format

/pattern/optionsRegex syntax

Page 2: Regex Cards - Powerpoint Format

[abc]A single character: a, b, or c

Page 3: Regex Cards - Powerpoint Format

[^abc]Any single character but a, b, or c

Page 4: Regex Cards - Powerpoint Format

[a-z]Any single character in the range a-z

Page 5: Regex Cards - Powerpoint Format

[a-zA-Z]Any single character in the range a-z or A-Z

Page 6: Regex Cards - Powerpoint Format

^Start of line

Page 7: Regex Cards - Powerpoint Format

$End of line

Page 8: Regex Cards - Powerpoint Format

\AStart of string

Page 9: Regex Cards - Powerpoint Format

\zEnd of string

Page 10: Regex Cards - Powerpoint Format

.Any single character

Page 11: Regex Cards - Powerpoint Format

\sAny whitespace character

Page 12: Regex Cards - Powerpoint Format

\SAny non-whitespace character

Page 13: Regex Cards - Powerpoint Format

\dAny digit

Page 14: Regex Cards - Powerpoint Format

\DAny non-digit

Page 15: Regex Cards - Powerpoint Format

\wAny word character (letter, number, underscore)

Page 16: Regex Cards - Powerpoint Format

\WAny non-word character

Page 17: Regex Cards - Powerpoint Format

\bAny word boundary character

Page 18: Regex Cards - Powerpoint Format

(...)Capture everything enclosed

Page 19: Regex Cards - Powerpoint Format

(a|b)a or b

Page 20: Regex Cards - Powerpoint Format

a?Zero or one of a

Page 21: Regex Cards - Powerpoint Format

a*Zero or more of a

Page 22: Regex Cards - Powerpoint Format

a+One or more of a

Page 23: Regex Cards - Powerpoint Format

a{3}Exactly 3 of a

Page 24: Regex Cards - Powerpoint Format

a{3,}3 or more of a

Page 25: Regex Cards - Powerpoint Format

a{3,6}Between 3 and 6 of a

Page 26: Regex Cards - Powerpoint Format

iCase insensitive option.

Page 27: Regex Cards - Powerpoint Format

iCase insensitive option.

Page 28: Regex Cards - Powerpoint Format

mmake dot match newlines

Page 29: Regex Cards - Powerpoint Format

xignore whitespace in regex

Page 30: Regex Cards - Powerpoint Format

www.rubular.comCredit for content and a great tool for practicing.