Run a JavaScript regular expression against sample text and inspect matches.
The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.
Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.
The expression is compiled with selected flags and applied to input, returning match spans, captures, and global results. Syntax errors are reported before matching.
Contact us at [email protected] or [email protected] for help.
Pattern: /\w+/g Matches: 12 Match 1: "Contact" (position 0-7) Match 2: "us" (position 8-10) Match 3: "at" (position 11-13) Match 4: "support" (position 14-21) Match 5: "example" (position 22-29) Match 6: "com" (position 30-33) Match 7: "or" (position 34-36) Match 8: "sales" (position 37-42) Match 9: "company" (position 43-50) Match 10: "org" (position 51-54) Match 11: "for" (position 55-58) Match 12: "help" (position 59-63) Input: Contact us at [email protected] or [email protected] for help. ^^^^^^^ ^^ ^^ ^^^^^^^ ^^^^^^^ ^^^ ^^ ^^^^^ ^^^^^^^ ^^^ ^^^ ^^^^
Frontend validation, log debugging, and unit-test design test expressions.