Regular expressions, usually called regex, are patterns that describe text instead of naming it exactly. Instead of searching for one email address, a regex describes the shape of any email address: some word characters, an at sign, more word characters, a dot, and more word characters. That shift from exact text to shape is what makes regex powerful, and it is also what makes it confusing at first, because a short pattern can match a surprising amount of text.
This tester lets you try a pattern safely and see the result at once. Type the pattern, tick the flags you need, paste sample text, and press Test pattern. Every match is highlighted in yellow inside your text, and each match is listed below with its capture groups. Global finds all matches instead of stopping at the first, ignore case treats Ana and ana as the same, and multiline changes how the start and end anchors behave across lines.
Here is a worked example. The sample text mentions two contacts: Ana at ana@mail.com and Luis at luis@mail.com. The pattern with word boundaries, word characters, an at sign, more word characters, a dot, and more word characters matches both addresses and nothing else. Run it with the global flag and the tool reports two matches, highlights both addresses, and lists them in order. Remove the global flag and only the first address is reported, which shows why the flag matters.
Capture groups are parentheses that remember part of a match. The pattern for a date like 12-34 can wrap each number in parentheses, and the tool then lists group 1 as 12 and group 2 as 34 alongside the full match. Groups are how real code pulls pieces out of text: the area code from a phone number, the year from a date, or the username from an email. A group that did not take part in a match, for example in an either-or pattern, is listed as empty, which is normal.
Greedy matching is the most common surprise. A pattern like quote, dot star, quote meant to match one quoted phrase will swallow everything from the first quote to the last quote on the line, because dot star takes as much as it can. Adding a question mark after the star makes it lazy, so it stops at the first closing quote instead. When a highlight covers far more text than you expected, greediness is the first suspect, and the lazy version is the usual fix.
Anchors and boundaries keep patterns honest. Without them, a pattern for cat also matches scatter and location, because it only asks whether those letters appear anywhere. A word boundary at each end limits the match to the standalone word cat. Start and end anchors limit a pattern to a whole line or a whole string, which is how you validate that an entire input is a postcode or a date, rather than merely containing one somewhere inside.
A final warning about real-world use: never trust a regex alone to validate security-sensitive input such as passwords or payment data, and never use a pattern copied from the internet without testing it on your own examples, including tricky ones. Test the pattern against text that should match and text that should not, including empty input and very long input. This tester makes that habit easy, and the few minutes it takes will save you from a pattern that works in the demo and fails in production.
Build complex patterns in small steps instead of writing the whole thing at once. Start with the simplest piece, test it, then add one element at a time and test again after each addition. When a step breaks the matches, you know exactly which piece caused it. This habit turns regex from a guessing game into ordinary debugging, and it works for every pattern from a simple word search to a full log parser.

Pingback: Probador de Regex con Resaltado Gratis - Prueba Patrones y Ve Cada Coincidencia