The obscured mails I know are normally shortened resp. normalized, may I suggest that you always use ... three dots?
Interesting...
That's pretty much what I put into production last evening. This is the live regexp:
Although, looking at it again, it could be simplified. Email address don't start with a full stop!$user->{'email'} =~ s/([\w|\.][\w|\.])[\w|\.]+\@(\w\w[\w|\.])[\w|\.]+\ +.([\w|\.]+)/\1...@\2.....\3/;
you should really always do it in an if-block to test for a successful match first
I always do except for simple tests like the one I posted. I have been bitten by that before and spent a couple of long nights trying to work out what was wrong, only to find my regexp wasn't matching an edge case and my loop was using values from the previous iteration. It was years ago but frustrating enough that it is unforgettable!
you might get bitten by variable interpolation if you don't escape the "@" in a regex: \@
Yes - I've been bitten by that before as well.
You are quite right, even in a quick test I should have escaped that one.
Thanks for the helpful feedback
In reply to Re^2: Counting characters within regexp
by Bod
in thread Counting characters within regexp
by Bod
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |