Safe Tools

Regular Expression (RegEx) Tester

Test and debug Regular Expressions locally in your browser. Real-time highlighting and capture group extraction supported.

πŸ“–View RegEx Cheat Sheet & Specs

Common Metacharacters (Anchors & Quantifiers)

Basic special characters that make up regular expressions.

  • ^ : Matches the beginning of a line.
  • $ : Matches the end of a line.
  • . : Matches any single character except a newline.
  • * : Matches the preceding character 0 or more times.
  • + : Matches the preceding character 1 or more times.
  • ? : Matches the preceding character 0 or 1 time (optional).
  • {n,m}RegexTester.metaBraces

Character Classes & Escape Sequences

Notations to concisely represent specific types of characters (numbers, alphabets, whitespaces, etc.).

  • [abc] : Matches any single character within the brackets (e.g., a, b, or c).
  • [^abc] : Matches any single character NOT within the brackets (negation).
  • [a-z] : Matches a character in the specified range (e.g., lowercase a to z).
  • \d : Matches any single digit character (equivalent to [0-9]). Uppercase \D matches non-digits.
  • \w : Matches any word character (alphanumeric & underscore. equivalent to [a-zA-Z0-9_]).
  • \s : Matches any whitespace character (space, tab, newline, etc.).
  • \ : Used to escape metacharacters (e.g., . or *) to treat them as normal characters. (e.g., \.)

Common RegEx Snippets for Practical Use

Standard validation patterns ready for copy & paste.

  • Email Address: ^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$
  • URL (http/https): ^https?://[\w\-]+(\.[\w\-]+)+[/#?]?.*$
  • Japanese Zip Code: ^\d{3}-\d{4}$
  • IPv4 Address: ^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.)`3`(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$
/
/

Highlight Preview

0 match(es)
Preview will appear here

Match Details / Capture Groups

No matching results

About Security

This tool performs all processing securely within your browser. Regular expression evaluation and string parsing are done locally and are never sent to external servers. Use with confidence.