Enter a regular expression (e.g., [A-Z]+ ) and matches
within the text will be highlighted. Acceptable formats:
m/pattern/flags (leading m is optional) — for pattern matching
s/from/to/flags to perform substitutions
Anything else is treated as a pattern for matching (and flags are determined by the checkbox options to the right)
The text matched by parenthetical groups will appear on the right.
Enter a regular expression with Show matches/substitutions
unchecked to quiz yourself. Then check the box and see if you guessed correctly.
NOTE: This is only a playground. Regular expressions
in JavaScript have limitations (e.g., .*
doesn't match newlines). Play here, but always
test your regular expressions in a real programming
environment — like perl.
This playground has been tested in MSIE 6.0 and Firefox 1.0.2;
your mileage may vary.