Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
system:regex:regex_notation [2018/04/13 11:45]
smayr
system:regex:regex_notation [2018/04/13 11:52] (current)
smayr [Regex Quick Reference]
Line 25: Line 25:
  
 General Tokens: General Tokens:
 +^ Symbol       ^ Description ^
 | \n           | Newline | | \n           | Newline |
 | \r           | Carriage return | | \r           | Carriage return |
Line 32: Line 33:
  
 Anchors: Anchors:
 +^ Symbol       ^ Description ^
 | \G           | Start of match | | \G           | Start of match |
 | <nowiki>^</nowiki>            | Start of string | | <nowiki>^</nowiki>            | Start of string |
Line 43: Line 45:
 | \W           | Any non-word character | | \W           | Any non-word character |
  
-Flags/Modifiers (eg: "/.../i"):  +Flags/Modifiers (eg: "/regex here.../g"): 
-| g  | Blobal |+^ Symbol       ^ Description  
 +| g  | Global (do not return after first match) |
 | i  | Case insensitive | | i  | Case insensitive |
-| m  | Multiline (make dot match newlines) +| m  | Multiline (dot matches newlines, <nowiki>^</nowiki> and $ match start/end of line)  | 
-| s  | Single line  +| s  | Single line (dot matches newline) 
-| u  | Unicode |  +| u  | Unicode (match with full unicode) |  
-| x  | Ignore whitespace | +| x  | eXtended (ignore whitespace) |  
 +| X  | eXtra (disallow meaningless excapes
 | o  | Perform #{...} substitutions only once | | o  | Perform #{...} substitutions only once |
-| X  | eXtended |  +| A  | Anchored (anchor to start of pattern) |  
-| A  | Anchor |  +| J  | Duplicate group names (allow duplicate subpattern names) |  
-| J  | Duplicate group names | +| D  | Dollar end only ($ matches only end of pattern) 
  
 == Using Regex in PHP == == Using Regex in PHP ==