Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Backtracking problem with .*(?!bar)

by vbrtrmn (Pilgrim)
on Sep 24, 2003 at 13:34 UTC ( [id://293842]=note: print w/replies, xml ) Need Help??


in reply to Backtracking problem with .*(?!bar)

I have found people don't like to use the .*, I try to use it as infrequently as possible. Maybe one of these would help you out

.{0,} - Match 0 or more times. .?? - Match 0 or 1 times (as few as possible).

--
paul

Replies are listed 'Best First'.
•Re: Re: Backtracking problem with .*(?!bar)
by merlyn (Sage) on Sep 24, 2003 at 20:04 UTC
      Except that .* is better for golf!
Re: Re: Backtracking problem with .*(?!bar)
by perlguy (Deacon) on Sep 24, 2003 at 14:21 UTC
    Could I get an example from you on when using the ?? quantifier would be appropriate? I find this a strange example to show as an alternative to the infamous dot star.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-03-29 04:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found