in reply to Newbie Regex Problem
The '*' is greedy, matching as much as it can. To make it non-greedy, put a question mark after it.
if ($test =~ "LDAP://CN=(.*?),.*") {
non-Perl: Andy Ford
In Section
Seekers of Perl Wisdom
in reply to Newbie Regex Problem
The '*' is greedy, matching as much as it can. To make it non-greedy, put a question mark after it.
if ($test =~ "LDAP://CN=(.*?),.*") {
non-Perl: Andy Ford