A little help for everyday work.
Free to useFind a tool
Developer tools

Regex Tester

Test JavaScript regular expressions against sample text.

⌑ Runs in your browserNo sign-up needed
01

Your inputs

Your inputs and files stay on your device.

02

Your result

◎

A little input. A useful answer.

Enter your values and run the tool to see your result here.

How to use this tool

  1. Enter a pattern.
  2. Paste text.
  3. Inspect matches.

About Regex Tester

Test patterns and inspect their matches.

Does this tool send my data anywhere?

No. Its calculation or transformation happens on your device.

Using Regex Tester with the right inputs

Test JavaScript regular expressions against sample text. Start by matching your task to the quantities and options shown below. The definitions of the inputs matter as much as the final number or transformed output; retain the original values so that you can repeat or check the result.

Inputs and options explained

  • Pattern: enter the value or text requested by this field. Check spelling, separators and case when they are significant to the operation.
  • Text: paste the source text without omitting meaningful spaces, quotation marks or line breaks. Begin with a small representative sample so that you can check the transformation before processing a longer input.

Checking the result

Begin with a small input whose expected result you can check by inspection or a separate calculation. Apply the selected operation, compare the output with that expectation, and then change one input or option at a time. This helps distinguish a change caused by your settings from a difference in the source data.

Interpretation and limitations

A generated snippet or successful syntax check is a starting point for testing. Check the result in the target browser, parser or application with representative data. Formatting, encoding and syntax validity do not establish that code is secure or that it meets an application’s business rules.

Can I use the output immediately in a project?

Review it first, then test it in the environment that will consume it. Keep secrets and production credentials out of example data and confirm escaping, expected types and edge cases before deployment.

Before you use the output

  • Choose the intended action: Test regex. Re-run the operation after changing an input or mode so that you are checking the updated result.
  • Read the result label and any accompanying explanation. Keep the input values or source file with the output so that a later comparison uses the same assumptions.
  • If a result looks unexpected, check units, separators and selected options first. Try a smaller example you can verify rather than repeatedly changing several settings at once.

Questions or a result that needs checking?

If you find a discrepancy, report a problem with Regex Tester. Include a non-sensitive example, the selected options, the result you expected and the result shown. This makes the issue easier to reproduce. See About & privacy for how the site handles tool inputs.

A few useful next steps.

More developer tools →