Skip to content

Pattern workbench

Regex Builder

Write a regular expression or assemble it from blocks, read what each part does, and test it live against your own text.

For

    Blocks

    Each block is one part of the pattern. Drag the handle to reorder, or edit a field and the pattern follows.

    What it means

    Point at a line to light up its part of the pattern and its block.

      Test text

      Matches light up as you type. Each group has its own colour.

      Test cases

      Strings that must match, and strings that must not. They rerun on every change.

        Use it in code

        Converted for the chosen language, including the replacement.