Regex Generator + Explainer
Regex syntax isn't hard because it's complicated — it's hard because everyone forgets it between the times they need it, and the flavor changes just enough between JavaScript, Python, and PCRE to make copy-pasting from an old script risky. Describe what you're trying to match in plain English, pick your language, and get a working pattern with a part-by-part explanation of what each piece actually does — not just the answer, but why it works.
Example
"Match a US phone number, optionally with a country code"
/^(\+1[- ]?)?\(?\d{3}\)?[- ]?\d{3}[- ]?\d{4}$/(\+1[- ]?)? makes the country code optional, \(?\d{3}\)? allows an area code with or without parentheses, and the rest matches the remaining seven digits with optional separators. Matches "555-123-4567", "+1 (555) 123-4567", and "5551234567" — rejects anything with too few or too many digits.