Home/Tools/Regular Expression Tester

Regular Expression Tester

Test and debug regular expressions (regex) with real-time matching, syntax highlighting, and detailed explanations. Supports JavaScript, Python, and PCRE flavors.

Privacy Notice: All regex testing happens in your browser. Nothing is sent to a server or stored.

Quick Presets

Click to load pattern + sample text

Regular Expression Pattern

//
gimsuy

Flags

Test String

Enter test string here...

Pattern Library

Match Details

No matches found

Try adjusting your pattern or test string

Pattern Explanation

Enter a regex pattern to see its explanation

Quick Reference Guide

Character Classes

.Any character except newline
\dAny digit (0-9)
\DAny non-digit
\wAny word character (a-z, A-Z, 0-9, _)
\WAny non-word character
\sAny whitespace character
\SAny non-whitespace character
[abc]Any of a, b, or c
[^abc]Not a, b, or c
[a-z]Any lowercase letter

Quantifiers

*Zero or more
+One or more
?Zero or one (optional)
{3}Exactly 3
{3,}3 or more
{3,5}Between 3 and 5

Anchors

^Start of string/line
$End of string/line
\bWord boundary
\BNot a word boundary

Groups

(abc)Capturing group
(?:abc)Non-capturing group
(?<name>abc)Named capturing group
\1Backreference to group 1

Lookaround

(?=abc)Positive lookahead
(?!abc)Negative lookahead
(?<=abc)Positive lookbehind
(?<!abc)Negative lookbehind

Special

|Alternation (OR)
\Escape special character
\nNewline
\tTab
\rCarriage return

Need Professional IT Services?

Our IT professionals can help optimize your infrastructure and improve your operations.

References & Citations

  1. MDN Web Docs. (2024). Regular Expressions. Retrieved from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions (accessed January 2025)
  2. Jeffrey Friedl. (2006). Mastering Regular Expressions. O'Reilly Media. Retrieved from https://www.oreilly.com/library/view/mastering-regular-expressions/0596528124/ (accessed January 2025)

Note: These citations are provided for informational and educational purposes. Always verify information with the original sources and consult with qualified professionals for specific advice related to your situation.

0