{"columns":["Token","Group","Meaning","Example"],"rows":[[".","Characters","Any character except a line break","a.c matches abc"],["\\d","Characters","A digit 0–9","\\d\\d matches 42"],["\\D","Characters","Anything but a digit","\\D matches x"],["\\w","Characters","A word character: letter, digit or underscore","\\w+ matches user_1"],["\\W","Characters","Anything but a word character","\\W matches @"],["\\s","Characters","Whitespace: space, tab, line break","a\\sb matches a b"],["\\S","Characters","Anything but whitespace","\\S+ matches word"],["\\t","Characters","Tab","a\\tb"],["\\n","Characters","Line feed","line\\nnext"],["\\r","Characters","Carriage return","\\r\\n"],["\\","Characters","Escapes the next character","\\. matches a literal dot"],["\\u00e9","Characters","A Unicode character by hex code (JavaScript)","\\u00e9 matches é"],["\\p{L}","Characters","Any character with a Unicode property; needs the u flag","\\p{L}+ matches café"],["[abc]","Classes","Any one of a, b or c","[aeiou] matches a vowel"],["[^abc]","Classes","Any character except a, b or c","[^0-9] matches a non-digit"],["[a-z]","Classes","Any character in the range a to z","[A-Fa-f0-9] matches a hex digit"],["^","Anchors","Start of the string, or of a line with the m flag","^Hello"],["$","Anchors","End of the string, or of a line with the m flag","end$"],["\\b","Anchors","Word boundary","\\bcat\\b matches cat but not category"],["\\B","Anchors","Not a word boundary","\\Bcat matches bobcat"],["*","Quantifiers","Zero or more of the previous item","ab*c matches ac and abbc"],["+","Quantifiers","One or more","ab+c matches abc but not ac"],["?","Quantifiers","Zero or one; makes the previous item optional","colou?r matches color and colour"],["{n}","Quantifiers","Exactly n times","\\d{4} matches 2026"],["{n,}","Quantifiers","n or more times","\\d{2,} matches 42 and 123"],["{n,m}","Quantifiers","Between n and m times","\\d{2,4}"],["*? +? ??","Quantifiers","Lazy: match as few as possible","<.+?> matches one tag"],["(abc)","Groups","Capturing group, referenced later as $1 or \\1","(\\d+)-\\1 matches 12-12"],["(?:abc)","Groups","Non-capturing group","(?:ab)+ matches abab"],["(?<name>abc)","Groups","Named capturing group","(?<year>\\d{4})"],["\\1","Groups","Backreference to group 1","(\\w)\\1 matches ll in hello"],["\\k<name>","Groups","Backreference to a named group","(?<q>['\"]).*?\\k<q>"],["a|b","Groups","Alternation: a or b","cat|dog"],["(?=abc)","Lookaround","Positive lookahead: followed by abc","\\d+(?=px) matches 10 in 10px"],["(?!abc)","Lookaround","Negative lookahead: not followed by abc","\\d+(?!px)"],["(?<=abc)","Lookaround","Positive lookbehind: preceded by abc","(?<=\\$)\\d+ matches 5 in $5"],["(?<!abc)","Lookaround","Negative lookbehind: not preceded by abc","(?<!-)\\d+"],["g","Flags","Global: find every match, not just the first","/a/g"],["i","Flags","Case-insensitive","/hello/i matches HELLO"],["m","Flags","Multiline: ^ and $ match at each line","/^\\d/m"],["s","Flags","Dot-all: . also matches line breaks","/a.b/s"],["u","Flags","Unicode: enables \\p{} and full code points","/\\p{Emoji}/u"],["y","Flags","Sticky: match only at lastIndex (JavaScript)","/a/y"],["$1","Replacement","Inserts capture group 1","(\\w+) (\\w+) → $2 $1"],["$<name>","Replacement","Inserts a named group","$<year>"],["$&","Replacement","Inserts the whole match","[$&]"],["$$","Replacement","A literal dollar sign","$$5"]]}