Tested regular expressions you can open in the tester, read the explanation of and adapt. Each pattern comes with sample text and unit tests. Save your own pattern with Save & share and tick “publish” to add it here.
8 patterns
(?:^|,)(?:"((?:[^"]|"")*)"|([^,]*))
Splits one CSV line into fields, handling quoted fields with commas and doubled quotes. Group 1 = quoted content, group 2 = plain field.
^\s*([A-Za-z_][\w.]*)\s*=\s*"?([^"\n]*)"?\s*$
KEY=value lines; group 1 is the key, group 2 the value (quotes not included). Comments and blank lines are skipped.
([a-z\d])([A-Z])
Inserts an underscore before each capital letter that follows a lowercase letter or digit. Replace with "$1_$2" and lowercase the result in code.
\b0[xX][\da-fA-F]+\b
0x-prefixed hexadecimal numbers like 0xFF and 0x1a2b.
\/\/.*|\/\*[\s\S]*?\*\/
Line comments (// …) and block comments (/* … */, across lines).
"((?:[^"\\]|\\.)*)"
Double-quoted strings with escaped characters inside (\" \\ \n …). Group 1 is the content.
\bv?(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([\da-zA-Z-]+(?:\.[\da-zA-Z-]+)*))?(?:\+([\da-zA-Z-]+(?:\.[\da-zA-Z-]+)*))?\b
MAJOR.MINOR.PATCH with optional pre-release and build metadata, from the semver.org specification (simplified).
\b[\da-fA-F]{8}-[\da-fA-F]{4}-[1-8][\da-fA-F]{3}-[89abAB][\da-fA-F]{3}-[\da-fA-F]{12}\b
Version 1–8 UUIDs in the canonical 8-4-4-4-12 form, any case.