Originally published at https://bestlatestapps.com/blog/how-to-test-a-regular-expression-live-with-groups-and-replace/.
Most developers write a regex only now and then, which is exactly the frequency at which you forget whether lookbehind is supported or why your pattern only matches once. Regex tester highlights matches as you type, lists every capture group, and previews replacements, so you can see the result before it goes into code.
Steps
- Type the pattern and flags, or pick an example.
- Paste test text.
- Read the highlighted matches and the table of groups, and try a replacement using
$1or