Regular Expression
//
Test String
Results0 matches
    Help & Cheatsheet

    How It Works

    1. Enter your expression in the first box.
    2. Type the text you want to test against.
    3. Select flags like 'g' (global) to find all matches.
    4. View results in real-time in the "Results" tab (or on the right on desktop).

    Interactive Cheatsheet

    Click any item to insert it into your expression.

    .
    Any character except newline
    \w, \d, \s
    Word, digit, whitespace
    \W, \D, \S
    NOT word, digit, whitespace
    [abc]
    Any of a, b, or c
    [^abc]
    NOT a, b, or c
    [a-g]
    Character between a & g
    ^
    Start of string / line
    $
    End of string / line
    \b
    Word boundary
    (...)
    Capture group
    a*
    0 or more "a"s
    a+
    1 or more "a"s
    a?
    0 or 1 "a"
    a{5}
    Exactly five "a"s
    a{2,}
    Two or more "a"s
    a{1,3}
    Between one & three "a"s