Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Newbie Regex Problem

by andyford (Curate)
on Oct 19, 2007 at 21:12 UTC ( #646081=note: print w/ replies, xml ) Need Help??


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


Comment on Re: Newbie Regex Problem
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://646081]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (10)
As of 2015-07-04 11:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (59 votes), past polls