gettinytool.com
๐Ÿ”Ž

Regex Tester

Test regex patterns with live matches and groups

//g

Enter a pattern and test string,
then click Test Regex

Quick Reference

.Any char except newline
\dDigit [0-9]
\wWord char [a-zA-Z0-9_]
\sWhitespace
^Start of string/line
$End of string/line
*0 or more
+1 or more
?0 or 1 (optional)
{n,m}Between n and m
(...)Capture group
(?:...)Non-capture group
(?<name>...)Named group
[abc]Character class
[^abc]Negated class
a|bOR โ€” a or b

Sponsored

Related Tools

Sponsor this ยท ads@gettinytool.com

Free Online Regex Tester โ€” Test Regular Expressions in Real Time

This free online regex tester lets you write, test, and debug regular expressions against any string with live match highlighting. Supports JavaScript regex syntax with all standard flags: global (g), case-insensitive (i), multiline (m), and dotAll (s).

Whether you're validating email addresses, parsing log files, extracting data from text, or building input validation rules, this regex tool gives you instant feedback without switching to a terminal.

What you can test with this tool

  • Email validation regex: /^[\w.-]+@[\w.-]+\.[a-z]{2,}$/i
  • URL matching: extract links from raw text
  • Named capture groups: (?<year>\d{4})-(?<month>\d{2})
  • Lookaheads and lookbehinds for complex pattern matching
  • Multi-line log parsing and structured data extraction

Regex flags explained

g (global) โ€” find all matches, not just the first. i (ignoreCase) โ€” match regardless of letter case. m (multiline) โ€” make ^ and $ match line boundaries. s (dotAll) โ€” make . match newline characters too.

FAQ

Which regex flavor does this tool use?

JavaScript (ECMAScript) regex, powered by the browser's native RegExp engine. This matches the syntax used in Node.js, React, and all modern browsers.

How do I match a literal dot or parenthesis?

Escape special characters with a backslash: \. matches a literal dot, \( matches a literal parenthesis.

We use essential cookies for site functionality and optional analytics cookies to improve tools. Read our Privacy Policy and Terms.