A pattern that worked in a tweet does not work in your language. RegexShift tests regular expressions against sample text with live match highlighting in the browser. Use it to debug a capture, to see why \d+ ate too much, to check flags. Do not use it as a parser for HTML, as a production linter, or as a way to 'validate email' with a 200-character meme pattern. JavaScript regex is not PCRE is not Python. If the production engine is Go RE2, some of your lookarounds will simply not exist. Test in the engine you ship.
Write the pattern, paste haystack, see matches. Flags (g, i, m, s, u) change the story. Capture groups show what you will actually get in code. Catastrophic backtracking can freeze the tab on an evil pattern plus a long string. If the page locks, the pattern is the suspect, not the computer. Simplify.
When not to use it: parsing HTML, CSV with quoted commas, or nested JSON. Also skip secret production data in the haystack; use a realistic fake. SlugShift and CaseShift are better at those jobs than a regex you will not remember in a month. CronShift is for cron, not for regex.
Privacy is local. Still, pasting a customer dump to 'test a pattern' is how dumps travel. Synthetic samples are enough. Close the tab. The pattern is not stored unless you copy it to the repo — which you should, with a comment. Email-validation folklore is either too loose or unreadable; use a platform validator or a library.
Haystack: order IDs like ORD-1042 and a note 'ORD-1042-OLD'. Pattern ORD-(\d+) with g highlights both, capturing 1042 twice. You want only the first token: \bORD-(\d+)\b and the second match dies. You paste the pattern into Python and remember to raw-string it. The sample was fake. No customer file uploaded. Word boundaries turning ORD-1042-OLD into a non-match is the capture you actually wanted in code. Catastrophic backtracking freezes the tab; simplify instead of waiting it out on production traffic later.
RegexShift runs in the browser. Patterns and samples stay on the device. Do not paste real customer dumps. Use synthetic strings. Close the tab when the pattern is in source control. Use fake strings; close the tab when the pattern is in source control with a comment a human can read.
Full policy: Shift Privacy Policy. Questions: [email protected].
Flags, escaping, and lookbehind support differ. Python wants raw strings. Go RE2 rejects some constructs. The tester is a JS-ish engine. Python wants raw strings; flags and lookbehind support differ; this tester is a JavaScript-ish engine.
You will cry. Use an HTML parser. RegexShift will happily highlight a lie. You will cry if you parse nested HTML tags here; use an HTML parser and keep the regex for tokens.
Nested quantifiers on overlapping tokens, plus a long non-match, can explode. If the tab dies, rewrite the pattern. Do not 'wait it out' on production traffic. Nested quantifiers on overlapping tokens plus a long non-match explode; rewrite rather than 'optimize later.'
The honest ones are either too loose or unreadable. Use the platform validator or a library. Do not paste a 6 KB email regex from a blog. Do not paste a 6 KB email regex from a blog into production; the honest patterns are boring on purpose.
Related tools: DiffShift · JsonShift · SlugShift
Guides · All Shift tools · About · Contact