Regex Forge

Test a regular expression live, read what it does in plain English, try find and replace, and copy ready code. Stuck? Describe what you want to match and let AI write it.

//g

Test text

Matches click a match for details

What it means

    Match details

    Ask the AI

    AI settings

    Only your pattern, the description and the first 1,500 characters of the test text are sent to the AI you choose. Testing, highlighting and the explanation above never leave your browser.

    Use it in code

    
      

    Cheat sheet

    .any character
    \d \Ddigit / not digit
    \w \Wletter, digit, _ / not
    \s \Sspace / not space
    \bword edge
    ^ $start / end
    [abc]a, b or c
    [^abc]not a, b or c
    [a-z]a to z
    a|ba or b
    (…)capture group
    (?:…)group, no capture
    (?<n>…)named group
    *0 or more
    +1 or more
    ?optional
    {3}exactly 3
    {2,5}2 to 5
    *? +?as few as possible
    (?=…)followed by
    (?!…)not followed by
    (?<=…)preceded by
    \1same as group 1
    \. \( \\a literal . ( \

    About Regex Forge

    Regex Forge is a regular expression tester: see every match and capture group highlighted live, read a plain-English explanation, test find and replace, or let AI write the pattern.

    How to use Regex Forge

    1. Type a regular expression or pick a common pattern, and paste some test text.
    2. Press “Write the regex for me”.
    3. Check the highlighted matches and the plain-English explanation, then copy the code for your language.

    Can it give me code for my language?

    Yes. Copy ready-to-use code for JavaScript, Python and other languages.

    Is Regex Forge free?

    Yes. It is free to use, with no account, no watermark and no paywall. The AI uses a free shared allowance; if it is busy or at its daily limit, try again later or add your own Gemini key.

    Are my files uploaded?

    Only when you use its AI features: then the text you give the AI is sent to Google’s Gemini model through MigaBuilder’s free AI service, or your own Gemini key. Everything else stays in your browser.