often.cloud
← all tools

Regex tester

Web

Test a JavaScript regex against a string with live matches.

What this tool helps with

This tester runs a JavaScript regular expression against your sample text and highlights matches and capture groups live as you type the pattern or the input. Because it uses the browser's own RegExp engine, behaviour is exactly what you get in Node or the browser at runtime — including JS-specific quirks that differ from PCRE or Python's re. Nothing is uploaded, so testing patterns against real log lines or user data is safe.

Result2 matches
hello 123, world 456

How to use Regex tester

  1. Open the Regex tester page and paste, type, or generate the regex input you want to work with.
  2. Pick the options you need so the tool can test a JavaScript regex against a string with live matches
  3. Copy the regexp result with one click and use it in your next step — terminal, editor, ticket, or anywhere else you need it.

Common uses

  • Reach for Regex tester when you need to test a JavaScript regex against a string with live matches during debugging, code review, or content preparation.
  • Skip installing a desktop regex app — open this web utility on a shared machine, an iPad, or a colleague's laptop and it just works.
  • Bookmark or share the page when you and your team keep coming back to the same regex, regexp, match, and test workflow.

FAQ

Why does my pattern work here but not in another language?

This uses JavaScript's regex engine. Lookbehind support, named groups, Unicode property escapes, and the s/u flags behave per the ECMAScript spec, which differs from PCRE, Python, and Go. Test in the engine you'll actually run.

What does the global flag change?

Without g, a match returns the first result. With g, repeated calls advance through the string and you get every match. It also affects replace() replacing all vs the first occurrence.

How do I match across newlines?

The dot does not match newlines by default. Add the s (dotAll) flag so . spans line breaks, or use the m flag to make ^ and $ match at each line.

Related tools

Helpers for the browser platform.