How to Use the Regex Tester Online
- 1Enter the pattern without surrounding slash delimiters and choose any flags separately.
- 2Paste one input per line in Lines mode. Switch to Test cases to keep multiline text together.
- 3Choose Run tests and open match details for offsets and capture values. Set Expected on any line to check an outcome.
- 4Changing a flag reruns tests automatically. After editing the pattern or input, choose Run tests. Copy the results if you need them in a review.
Input & Output Examples
All three tests pass. The first match splits into the project and number captures. The other cases confirm the pattern rejects a zero issue number and lowercase keys.
Pattern: ^(?<project>[A-Z]{2,5})-(?<number>[1-9]\d*)$
BUG-42 → Match
BUG-0 → No match
bug-9 → No matchCase 1: Pass (expected match, found match)
[0, 6) "BUG-42"
project = "BUG"
number = "42"
#1 = "BUG"
#2 = "42"
Case 2: Pass (expected no match, found no match)
Case 3: Pass (expected no match, found no match)Case-insensitive matching makes the lowercase case fail its expectation. The failure points to the exact input whose intended behavior changed.
Same pattern with the i flag
BUG-42 → Match
BUG-0 → No match
bug-9 → No matchCase 1: Pass (expected match, found match)
[0, 6) "BUG-42"
project = "BUG"
number = "42"
#1 = "BUG"
#2 = "42"
Case 2: Pass (expected no match, found no match)
Case 3: Fail (expected no match, found match)
[0, 5) "bug-9"
project = "bug"
number = "9"
#1 = "bug"
#2 = "9"Run the issue-key pattern on all three lines in a single editor. The results show each match by line number. Add an expectation if you need to verify that a line stays accepted or rejected.
Lines mode
BUG-42
BUG-0
bug-9Line 1: Matched "BUG-42"
[0, 6) "BUG-42"
project = "BUG"
number = "42"
#1 = "BUG"
#2 = "42"
Line 2: No match "BUG-0"
Line 3: No match "bug-9"Practical Developer Workflows
- Check a naming rule against valid and invalid examples before changing a validator.
- Compare how flags affect a pattern while keeping the same test strings and expectations.
- Inspect captures and offsets for an existing pattern before using it to extract data from logs.
Zero Server Uploads & Complete Privacy
Runs 100% in your browser; no data is uploaded to any server.
Let us know directly so our engineering team can fix it.