. — any character; * — 0+; + — 1+; ? — 0 or 1[abc] — one of these characters; [a-z] — a range^ — start of string; $ — end(…) — capturing group; (?:…) — non-capturing\d — digit; \w — letter/digit/underscore; \s — whitespaceRegex is not the right tool for parsing HTML/XML (use DOM parsers) or complex formats like JSON. But it is ideal for format validation and text search.
regex101.com — online testing with an explanation of every token. Indispensable when debugging complex expressions.