Skip to main content

regex101: privacy-focused regex testing

Build, test, and debug regular expressions locally in your browser. Test strings and files stay on your device during processing.

Test PCRE2, JavaScript, Python, Go, Java, .NET, Rust, and POSIX patterns in regex101. Inspect explanations and capture groups, replace text, and keep expected results in unit tests.

Search documentation

Search guides, features, and reference pages.

    Get help

    Search runs in your browser. Queries are not sent to a search service.

    Worked examples​

    Verify an AI-generated regex

    Test accepted and rejected inputs before using a generated pattern in your application.

    Extract fields from logs

    Extract order IDs, add regression tests, and run the generated JavaScript.

    Clean text in steps

    Load a file, apply two replacement layers, and copy the completed text.

    Compare regex performance

    Compare execution times for the same inputs and repeat the measurement in Node.js.

    regex101 Pro

    Pro supports more than two test strings, substitution pipelines, benchmarks, and document extraction.

    Compare Free and Pro →

    Self-host regex101

    Deployment requirements, included features, and annual Enterprise pricing.

    Self-hosting documentation →

    Help and releases

    Community discussions, bug reports, and release notes.

    Support resources →