Test, explain, and replace regular expressions
Contacts: john@example.com1 and support@utilsbox.dev2 This is not an email.
[\w.+-]uno de estos caracteres: \w.+-+1 o más veces@texto literal "@"[\w-]uno de estos caracteres: \w-+1 o más veces\.carácter literal "." (escapado)[a-zA-Z]uno de estos caracteres: a-zA-Z{2,}se repite 2 a vecesThe pattern, the flags, and the sample text sit at the top. Matches and the replacement show beside them.
Type the pattern without the slashes of a JavaScript literal. Turn on the flags you need: g walks every match, i ignores case, m makes ^ and $ apply per line. Paste the sample and read the highlighted matches and capture groups. In replace mode, $1 and $2 insert those groups.
Pattern ([a-z0-9._%+-]+)@([a-z0-9.-]+\.[a-z]{2,}), flag i, text "Write to Ana@Utilsbox.biz today". The full match is the address, group 1 is Ana, and group 2 is Utilsbox.biz. A replacement of [$1] leaves [Ana] where the address was.
A quantifier inside another quantifier, such as (a+)+, can take a very long time on a long near-match. If the page stops responding, shorten the sample and remove the nested quantifier before you ship that pattern to a server.
This page uses the browser JavaScript engine. Lookbehind, possessive quantifiers, and some classes from other engines (PCRE, .NET) do not behave the same. Test the pattern on the engine that will run it.
No. The field is the pattern only. Flags are the buttons, not a trailing /g.
Yes. Test and replace send the pattern and the text to the Utilsbox API and return the matches. They are not stored as an account. Do not paste data that must not travel over the network.