logo
logo

Regex Tester - Test Regular Expressions | Lembog

Regex Tester

Test and debug regular expressions with real-time matching

Quick Reference

. = any char\d = digit\w = word char\s = whitespace* = 0+ times+ = 1+ times? = 0-1 times^ = start

Regex Tester - Test Regular Expressions

Test and debug regular expressions with real-time matching and replacement. Our Regex Tester shows matches instantly and supports common regex patterns.

Features

  • Real-time matching - See matches as you type
  • Flag support - Global, case-insensitive, multiline
  • Replacement testing - Test regex replace operations
  • Match highlighting - View all matches
  • Common patterns - Quick-load email, phone, URL patterns
  • Quick reference - Regex syntax cheat sheet

Regex Flags

FlagMeaning
gGlobal - find all matches
iCase-insensitive
mMultiline mode
sDot matches newlines

Common Patterns

PatternUse Case
Email[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}
Phone\d{3}[-.]?\d{3}[-.]?\d{4}
URLhttps?://[\w.-]+(?:/[\w.-]*)*
IP Address\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}
Date\d{4}-\d{2}-\d{2}

How to Use

  1. Enter your regex pattern
  2. Select flags (g, i, m, s)
  3. Enter test text
  4. View matches highlighted
  5. Optionally enter replacement text
  6. See replacement result

Quick Reference

SyntaxMeaning
.Any character
\dDigit (0-9)
\wWord character
\sWhitespace
*0 or more
+1 or more
?0 or 1
^Start of line
$End of line

FAQs

Is my data secure?

Yes! All processing happens in your browser.

What regex flavor is this?

JavaScript regex (ECMAScript).

Can I test lookahead/lookbehind?

Yes, JavaScript supports (?=), (?!), (?<=), (?<!).

Use Cases

  • Pattern development - Build and test regex
  • Data validation - Validate email, phone, etc.
  • Text extraction - Extract specific patterns
  • Learning - Understand regex behavior