Hello,

I have a string like: dns\.support.dnsbed.com
I want to translate it to a regular email address: dns.supp...@dnsbed.com


    if ($string =~ /^(.*?)(?<!\\)\.(.*)$/) {
        my $user = $1;
        my $tld = $2;
        return $user . '@'. $tld;
     }

But this won't work correctly. I got:
d...@support.dnsbed.com

Where do I get wrong? Thanks.

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to