/**/

RegEx Tester

Test and debug regular expressions in real-time.

Regular Expression
//
Test String
Matches (0)
No matches found.

    What is a Regular Expression?

    A Regular Expression (RegEx) is a sequence of characters that defines a search pattern. They are used in programming for string matching, validation, searching, and text transformation. C# developers use System.Text.RegularExpressions.Regex in .NET; JavaScript developers use built-in RegExp objects.

    This tool provides an instant, real-time environment to test your patterns — highlighting matches as you type, so you can iterate quickly without needing to run your application.

    Common RegEx Patterns Reference

    PatternMatchesExample
    \d+One or more digits123, 4567
    \w+Word charactershello, world_1
    ^Start of lineBeginning of string
    $End of lineEnd of string
    \bWord boundaryWhole word match
    [a-z]Character rangeAny lowercase letter
    (?:...)Non-capturing groupGroup without capture
    (?=...)Positive lookaheadMatch before condition

    Frequently Asked Questions

    Does this support .NET regex syntax?

    Uses JavaScript's engine, compatible with most common .NET patterns. Some advanced .NET features like balancing groups differ.

    What regex flags are supported?

    g (global), i (case-insensitive), m (multiline), s (dotAll), u (Unicode mode).

    How do I match a whole word?

    Use word boundary anchors: \bword\b — this matches 'word' but not 'sword' or 'words'.

    What is greedy vs lazy matching?

    Greedy (*, +) matches as much as possible. Lazy (*?, +?) matches as little as possible. Add ? after a quantifier for lazy mode.

    How do I match an email address?

    A basic pattern: ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$ — though full RFC 5322 compliance requires a more complex pattern.

    Related Tools