Calculator
Quick arithmetic operations for daily use.
Open CalculatorSmart tools for daily tasks — no sign-up needed
Validate regex patterns and inspect matching results.
UtilityBox's regex tester lets you check a JavaScript regular expression against your own sample text without installing anything. Type the pattern, add any flags (for example gi), paste the test text and click Run Regex: the tool lists every match with the character index where it starts, or tells you that nothing matched or that the pattern is invalid. Matching uses the browser's native RegExp engine in a background Web Worker, so a runaway pattern is stopped after 2 seconds instead of freezing the page. Your pattern and text are never sent to a server.
\d{3}-\d{4}.g to find every match or gi to find every match ignoring case. Leave it empty for a single, case-sensitive match.(a+)+ is stopped instead of hanging the tab.g and m flags, and check that only the expected strings appear in the match list before you put the pattern in your validation code.*, +, ?, {n,m}), anchors, character classes and alternation. The match list and error messages show what each change to the pattern does.It uses JavaScript's native RegExp engine, the same one built into your browser. It supports ECMAScript syntax such as lookaheads, lookbehinds, named and non-capturing groups, and Unicode property escapes with the u flag. A pattern that works here behaves the same way in other modern JavaScript environments such as Node.js.
Type any combination into the Flags field: g (global — every match, not just the first), i (case-insensitive), m (multiline — ^ and $ match at each line), s (dotAll — the dot also matches newlines), u (Unicode) and y (sticky — match only at the current position). The flags are passed straight to JavaScript's RegExp, so an unknown or repeated flag shows an "Invalid regex pattern/flags" message.
No. For each match it shows the full matched text and the index where it starts. Capture groups — numbered ($1, $2) or named — still work inside your pattern, but their individual values are not listed.
Yes. There is no account and no sign-up. The regex runs in your browser, so your pattern and test text are not sent to a server. To keep the page responsive, one run lists at most 10,000 matches and stops after 2 seconds.
Run Regex executes the pattern in a background Web Worker. If matching takes longer than 2 seconds — usually catastrophic backtracking caused by nested quantifiers like (a+)+ — the worker is stopped and the tool reports "Timed out — pattern too complex", so your tab never freezes. Simplify the pattern and run it again.
Yes. Paste any amount of text, including multiple lines, into the Test text box. Add the m flag so ^ and $ match at the start and end of each line, and the s flag if the dot should also match newline characters.
Without g, the tester reports only the first match. With g, it keeps scanning and lists every non-overlapping match in the text, each on its own line with its index. The summary line shows how many matches were found.
Yes. Add the u flag for full Unicode code-point matching, so characters outside the Basic Multilingual Plane such as emoji are treated as one character, and to use property escapes like \p{Letter} or \p{Script=Latin}. Without u, those escapes are not available and an emoji counts as two separate code units.