LLM API Cost Calculator
Compare monthly API costs across OpenAI, Anthropic, Gemini, and DeepSeek.
Test and visualize regular expressions live.
Paste this into any page — the live tool appears with a credit link back here.
Type a pattern and test text to highlight every match in real time.
Start with literal characters for what must match exactly, then add character classes such as digits, word characters, and whitespace for the variable parts. Quantifiers control repetition, anchors pin the match to the start or end, and groups capture the pieces you want to extract. Testing each addition live keeps one small change from silently breaking the whole pattern.
This tester uses the JavaScript regex engine, so patterns behave exactly as they would in browser code. Common flags are global matching, case-insensitive matching, and multiline anchors. Lookbehind assertions work in all modern browsers but fail in older ones, so check compatibility before shipping a pattern with lookbehind to production.
🔒 This tool runs entirely in your browser. Nothing is uploaded or stored.

Background reading: Regex Tester on Wikipedia. More: all developer tools.
Greedy quantifiers consume as much as possible. Make the key quantifier lazy, or narrow the character class so it cannot cross the boundary you intended.
Use a pragmatic pattern covering local part, at-sign, domain, and top-level domain rather than a perfect RFC pattern. For validation, prefer sending a confirmation email over an ever-longer regex.
Test answers whether a pattern matches at all, while match and exec return the matched text plus captured groups. Use test for validation checks and match when you need the extracted values.
Prefix regex metacharacters such as dots, brackets, and plus signs with a backslash to match them literally. Inside character classes most metacharacters lose their special meaning, except the caret, hyphen, bracket, and backslash.
Explore complementary free web utilities running 100% in your browser:
Compare monthly API costs across OpenAI, Anthropic, Gemini, and DeepSeek.
Preview how your page appears in Google and social cards.
Decode any cron schedule into plain English.
Pick colors and verify WCAG contrast ratios.
Oct 10, 2026
The free developer tools developers actually open daily: JSON, regex, encoders, lookups, CSS helpers. Browser-based, private, no sign-up.
Read postSep 7, 2026
Test and visualize regular expressions live.
Read post