Text & String Utilities100% Client-Side

Regex Tester

Paste a list into one editor and test each line independently with the same JavaScript regular expression. Results stay in line order and show which entries matched. Set an expected outcome on any line to turn it into a pass or fail check. Switch to Test cases for inputs that span multiple lines or when you want to set expectations before running. Both modes show match offsets and named or numbered capture groups.

Flags

3 lines checked, 1 matched.

Paste one input per line, up to 50 lines.

Line results

  1. Line 1

    BUG-42

    Matched1 match found

    Match details
    1. [0, 6) "BUG-42"

      project
      "BUG"
      number
      "42"
      #1
      "BUG"
      #2
      "42"
  2. Line 2

    BUG-0

    No match

  3. Line 3

    bug-9

    No match

How to Use the Regex Tester Online

  1. 1Enter the pattern without surrounding slash delimiters and choose any flags separately.
  2. 2Paste one input per line in Lines mode. Switch to Test cases to keep multiline text together.
  3. 3Choose Run tests and open match details for offsets and capture values. Set Expected on any line to check an outcome.
  4. 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.

Input Sample
Pattern: ^(?<project>[A-Z]{2,5})-(?<number>[1-9]\d*)$
BUG-42 → Match
BUG-0 → No match
bug-9 → No match
Expected Output
Case 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.

Input Sample
Same pattern with the i flag
BUG-42 → Match
BUG-0 → No match
bug-9 → No match
Expected Output
Case 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.

Input Sample
Lines mode
BUG-42
BUG-0
bug-9
Expected Output
Line 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.

Notice a bug, calculation error, or outdated info?

Let us know directly so our engineering team can fix it.

Frequently Asked Questions

Use Lines to check a pasted list against one pattern. Blank lines within the input are checked, and the final line break ends the last line. Use Test cases to apply the pattern to a whole multiline input. Editing the line list clears its expectations, while changing only the pattern or flags keeps them.

Explore Other Tools

12 suggested tools

View all tools