Text, Data & Code tool
Regex Builder & Tester
Start with a guided pattern or write your own JavaScript regular expression. Read plain-English explanations, highlight matches and copy the pattern, all privately in your browser.
Find a pattern in your text
A regular expression is a search rule. Choose what you want to find, add sample text, then test it.
Find the exact text you enter, even when it contains punctuation with special regex meanings. This searches within larger words too.
JavaScript syntax. Find-all (g) and Unicode (u) are always enabled. The m and s options mainly affect custom patterns.
Your pattern will appear hereFlags: guA few useful symbols
- [0-9]+
- One or more digits.
- ^ and $
- Start and end boundaries. Their behaviour changes with the multiline option.
- .
- One character, normally excluding line breaks.
- (…)
- A capturing group: keeps the matched part for the group list.
Up to 2,000 pattern characters and 50,000 sample characters. Tests run only when requested, in a separate browser worker with a 2-second stop limit. No uploads or saved drafts. A passing sample does not prove a pattern is correct or fast for every input; test it in the system where you plan to use it.
Processed privately in your browser — your entries are not uploaded.
Good to know
How this tool works
Choose a starting pattern, adjust the flags and paste sample text. Press Test pattern to highlight matches and inspect captured groups. The Copy pattern and Copy flags buttons provide separate values for your destination tool. Custom patterns run only in a terminable browser worker, not in the page interface.
Frequently asked questions
What is Regex Builder & Tester useful for?
Build a search pattern, test sample text and see the matches. Validate a small sample before processing important data, and keep a copy of the original input.
Is my information stored?
Your text is processed locally in a browser worker. It is not uploaded by this tool or saved in browser storage. Clear releases the working input and result. Downloads remain in your normal download folder.
Will this pattern work in another app?
This tool uses JavaScript regular expressions with global and Unicode flags. Other engines, such as Python or PCRE, may behave differently or need different syntax. Test in your target application before relying on a pattern.
Does a match validate the entire input?
Not necessarily. The starting patterns find matching portions of text; they do not automatically validate the whole input. Even a pattern that matches your samples may fail on other valid or invalid inputs.
Why was my test stopped?
Some patterns take excessive time on particular inputs. This tool stops the separate processor after two seconds, including startup time, and keeps your sample unchanged. Simplify nested repetitions, reduce the sample or choose another pattern. The timeout does not prove a pattern is safe elsewhere.