Using this result
How to read the regex tester
Matches, groups, and flags
The pattern box is a JavaScript regular expression. The test text is the string it runs against. Highlighted spans are matches. A capture group is the part of a match inside parentheses, and it appears in the group list as a number. Named groups appear under the name you wrote with ?<name>. Group 0 is the whole match. If the pattern compiles but nothing highlights, the pattern is valid and the text does not contain it. An error above the pattern is a syntax error, not a failed search.
Flags change the engine. g finds every match rather than the first. i ignores case. m makes ^ and $ match line boundaries. s lets a dot match a newline. u turns on Unicode mode, which you want for text outside ASCII. v is the newer Unicode set mode. A pattern copied from another language can fail here because lookbehind, possessive quantifiers, or a different escape is not the JavaScript flavor. The substitution box shows the replacement with $1 and named groups expanded. It does not modify a file.
Reading a surprising match
A pattern that matches more than you expected is usually greedy. .* will run to the end of the line and then backtrack. Use a more specific class, or a non-greedy .*?, and look at which span is highlighted. Anchors are the other common miss. Without ^ and $, a search succeeds when the pattern appears anywhere. Email and URL checks that are not anchored will accept a sentence that merely contains an address.
The preset library is a starting point, not a validator. An email preset does not prove an address exists. A date preset does not prove the date is real. Use Regex Generator when you want a pattern drafted from a description, then come back here and throw real samples at it, including the samples that should fail. A pattern that only ever sees the happy path will ship broken.