Testers
Tools for testing patterns and inspecting differences. All processing happens in your browser, so your data is never uploaded.
- Regex TesterWrite a pattern and see every match highlighted as you type, with capture groups and positions. Matching runs in a background thread, so even a catastrophically backtracking pattern will not freeze the page.
- Text DiffPaste two texts to see exactly what changed, line by line and word by word. Everything runs in your browser, so neither version is uploaded.
Test patterns or compare text
Use the regular expression tester when you need to inspect matches, capture groups, replacement output, or potentially expensive backtracking. Matching runs in a worker with a time limit, so a risky expression cannot freeze the page.
Use the text difference tool when the problem is changed content rather than a pattern. It provides side-by-side and unified views, with options for case, whitespace, and trailing spaces, while keeping both documents on your device.
Two ways of asking what changed
A pattern tester answers a question about shape: does this text match the rule I wrote, and which parts did it capture. A diff answers a question about content: these two things should be the same, so show me where they are not. Most debugging sessions need one or the other, and reaching for the wrong one is what turns twenty minutes into an afternoon.
If you are validating a field, extracting values from a log line, or replacing across a codebase, that is a pattern problem. If you are comparing two exports, two config files, or a response before and after a deploy, it is a difference problem.
Patterns fail on what you did not test
Most regular expressions are written by trying inputs that should match until one does, which reliably produces something too permissive. The pattern with no anchors that accepts anything with a valid address buried inside it is the classic result, and it passes every test its author thought to write.
So test the negatives: the malformed value, the delimiter that appears inside a field, the line that is nearly but not quite the format you expect. And keep in mind that the engine here is your browser's, so a pattern using lookbehind or named groups may behave differently in Python, Go or PCRE.
When two identical lines are not identical
The most common surprise in a diff is a change you cannot see, and the cause is nearly always invisible: trailing spaces, Windows line endings against Unix ones, a tab where the other file has spaces, a non-breaking space pasted in from a document, or a byte order mark sitting at the start of the first line.
The options for ignoring case, whitespace and trailing spaces exist to narrow that down quickly. Turn them off once you have found the real change, because in configuration files whitespace occasionally is the change.
