regex101: build, test, and debug regex

Regular Expressions 101

An explanation of your regex will be automatically generated as you type.

Detailed match information will be displayed here automatically.

  • A single character of: a, b or c

    [abc]

  • A character except: a, b or c

    [^abc]

  • A character in the range: a-z

    [a-z]

  • A character not in the range: a-z

    [^a-z]

  • A character in the range: a-z or A-Z

    [a-zA-Z]

  • Alternate - match either a or b

    a|b

  • Any whitespace character

    \s

  • Any non-whitespace character

    \S

  • Non-capturing group

    (?:...)

  • Between 3 and 6 of a

    a{3,6}

Regular Expression

Test String