×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
1
Language: PHP
Posted by: jaid int
Added: Jan 1, 2017 11:17 AM
Views: 2187
  1. Regex quick reference
  2.         [abc]     A single character: a, b or c
  3.         [^abc]     Any single character but a, b, or c
  4.         [a-z]     Any single character in the range a-z
  5.         [a-zA-Z]     Any single character in the range a-z or A-Z
  6.             ^     Start of line
  7.         $     End of line
  8.         \A     Start of string
  9.         \z     End of string
  10.         .     Any single character
  11.         \s     Any whitespace character
  12.         \S     Any non-whitespace character
  13.         \d     Any digit
  14.         \D     Any non-digit
  15.         \w     Any word character (letter, number, underscore)
  16.         \W     Any non-word character
  17.         \b     Any word boundary character
  18.         (...)     Capture everything enclosed
  19.         (a|b)     a or b
  20.         a?     Zero or one of a
  21.         a*     Zero or more of a
  22.         a+     One or more of a
  23.         a{3}     Exactly 3 of a
  24.         a{3,}     3 or more of a
  25.         a{3,6}     Between 3 and 6 of a
  26.