PasteZap
🌐 English
Free · No account

FREE · DEVELOPER TOOLS

Regex from Positive and Negative Samples.

Infer fixed-position character classes with an exact-alternative fallback.

Limits & supported formats

1–100 positive and up to 100 negative lines, 200 characters per line. Fixed UTF-16 positions, supplied examples only; no general grammar inference.

LOCAL PROCESSING · NO ACCOUNT
11 characters

1–100 positive and up to 100 negative lines, 200 characters per line. Fixed UTF-16 positions, supplied examples only; no general grammar inference.

How to use Regex from Positive and Negative Samples

Enter your input, adjust settings and generate locally. Review the output before use.

How it works

Infer fixed-position character classes with an exact-alternative fallback. 1–100 positive and up to 100 negative lines, 200 characters per line. Fixed UTF-16 positions, supplied examples only; no general grammar inference. Input remains in this browser page.

Example

Run the editable example to inspect the result.

Questions about Regex from Positive and Negative Samples

Is Regex from Positive and Negative Samples free, and do I need an account?

Yes. This tool is free to use in your browser without an account. Processing takes place on your device.

What are the limits and what should I check?

1–100 positive and up to 100 negative lines, 200 characters per line. Fixed UTF-16 positions, supplied examples only; no general grammar inference. Review the result before using it in your work.

Is my input sent to a server?

Your input is processed in your browser and is not uploaded by this tool. Files and pasted text are cleared when the page is refreshed. Normal website requests are still required to load the page and its libraries. Read the privacy explanation.