Hi ,

Below is the problem I am facing :

#!/usr/bin/perl

my @str = ('mailto:y...@gmail.com','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 y...@gmail.com 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

Reply via email to