Pattern matching syntax across JavaScript, Python, sed, grep, and most modern engines, plus 20+ ready-to-use patterns
s flag, includes newline)[0-9][^0-9][A-Za-z0-9_]a, b, or ca to z.)m flag)m flag)\w and \W)a or babcabcabcabc^ and $ match line breaks. matches newlines+, ?, {n,m}, () without escaping(?<name>...). Use g flag with matchAll().r"..." raw strings to avoid double-escaping. Named groups via (?P<name>...). Has verbose x flag for commenting.grep -E for ERE (where +, ?, {n,m}, () are special). Use grep -P for PCRE on GNU grep.fancy-regex crate for those.. * + ? ^ $ { } ( ) | [ ] \. Inside character classes, you only need to escape ] \ and the first ^..* matches the longest possible substring. .*? matches the shortest. Wrong one bites you on HTML/JSON-like inputs.^ and $ when you mean "match the whole string" rather than "match anywhere in it." Catches a surprising number of bugs.$3 meant.