Reference . non-newline char ^ start of line $ end of line \b word boundary \b word boundary \A start of subject \z end of subject \d decimal digit \D non-decimal digit \s whitespace \S non-whitespace \w word character \W non-word character (a|z) a or z [az] a or z [^az] not a or z [a-z] a through z (foo) capture foo a? 0 or 1 a a* 0 or more a a+ 1 or more a a{3} 3 of a a{3,} 3 or more a a{3,5} 3