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

    Snap blocks together: drag them from the palette or use Add block, then fill in the slots. Groups hold blocks in their mouth.

    What it means

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

      Use it in code

      Converted for the chosen language, including the replacement.

      
                              
                          

        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.