Hi, I have a regex problem. My current working program is like this :-
#!/usr/bin/perl *$str='ldap:///uid=user1,ou=People,o=test.com <http://test.com>,mailto:us...@test.com <us...@test.com>,ldap:///uid=user2,ou=People,o=test.com <http://test.com>,ldap:///uid=user3,ou=People,o=test.com <http://test.com>';* while($str=~/^(?:mailto:|ldap:\/\/\/)(.*?),(?:mailto:|ldap:\/\/\/)/){ print "first = $1"."\n"; # Process user for send email ProcessUser($first); if($str =~ /^(?:ldap:\/\/\/.+?|mailto:.+?),(ldap.*|mailto.*)/) { print "remain = $1"."\n"; $str=$1; } } However when I have input string as :- 'ldap:///uid=user1,ou=People,o=test.com,a...@test.com*,t...@test.com <t...@test.com>,r...@test.com <r...@test.com>*,ldap:///uid=user2,ou=People,o= test.com,ldap:///uid=user3,ou=People,o=test.com' it breaks. I tried multiple regex, however could not get it working. Any clue on regex changes to accomodate this ? Regards, Punit