Regex Isnât Hard - Tim Kellogg đ this is a pretty good conscience article on regexes, and I agree, regex isnât that hard⢠â However I think I can make the TL;DR even shorter đ
Regex core subset (portable across languages):
Character sets
⢠a matches âaâ
⢠[a-z] any lowercase
⢠[a-zA-Z0-9] alphanumeric
⢠[^ab] any char but a or b
Repetition (applies to the preceding atom)
⢠? zero or one
⢠* zero or more
⢠+ one or more
Groups
⢠(ab)+ matches âabâ, âababâ, âŚ
⢠Capture for extract/substitute via $1 or \1
Operators
⢠foo|bar = foo or bar
⢠^ start anchor
⢠$ end anchor
Ignore nonâportable shortcuts: \w, ., {n}, *?, lookarounds.