Hi , Below is the problem I am facing :
#!/usr/bin/perl
my @str = ('mailto:[email protected]','ldap:///uid=user1,ou=People,o=test.com
');
foreach (@str) {
# split off ldaps and mailtos
my @addr = $_ =~
/ldap:\/\/\/(.+)|mailto:(.+)/;
print $1;
}
When i run this I get uid=user1,ou=People,o=test.com as output however
don't get [email protected] printed.
Can anyone point me to single regex to achieve this ? I know how to handle
it with different regex checks but need a single regex.
Regards,
Punit
