User:Eugrus/regex: Difference between revisions

From Rosetta Code
Content added Content deleted
(early draft)
 
(No difference)

Latest revision as of 20:46, 23 April 2023

Syntax BRE ERE PCRE
Anchors ^ $ ^ $ ^ $ \A \Z
Character Classes [abc] [a-z] [^abc] [abc] [a-z] [^abc] [abc] [a-z] [^abc] \d \D \s \S \w \W
Quantifiers * \{m,n\} * + ? \{n\} \{n,\} \{n,m\} * + ? \{n\} \{n,\} \{n,m\} lazy matching
Grouping \(abc\) (abc) (abc) (?:abc)
Alternation N/A def def (?>abc)
Capturing Groups \1 \2 \1 \2 \1 \2 (?P<name>)
Lookahead/Lookbehind N/A N/A (?=abc) (?!abc) (?<=abc) (?<!abc)
Backreferences \1 \2 N/A \1 \2
Comments N/A N/A (?#comment)