sly001 wrote:Can anyone write a regex to match any email address where the three parts repeat, like [email protected] or [email protected] or [email protected]. Each part can consist of upper/lower letters and numerals and be of any length. The only constants are the @ and the dot.
(?<first>[A-Za-z0-9]+)@\k<first>\.\k<first>
Here is the list of characters that need to be escaped to use them as normal literals:
Opening square bracket [
Backslash \
Caret ^
Dollar sign $
Period or dot .
Vertical bar or pipe symbol |
Question mark ?
Asterisk or star *
Plus sign +
Opening round bracket ( and the closing round bracket )
These special characters are often called "metacharacters".
catches this:
spam123 <[email protected]>
Users browsing this forum: No registered users and 13 guests