Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: Pattern matching: Lazy vs. greedy

by QM (Parson)
on Mar 31, 2015 at 08:46 UTC ( [id://1121950]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Pattern matching: Lazy vs. greedy
in thread Pattern matching: Lazy vs. greedy

... I can’t categorically rule out repetitions of the first word, ...

Can you elaborate on the rules or goals you have in mind?

I would guess something like "shortest matching string" or "string with the smallest number of words" (for some value of $words). It's not necessarily easy to come up with this, but you should be able to list positive and negative examples to help tune the solution.

And most of us are just nerdy enough to want more specifics so we can solve it, or near enough. (Allowing the dreams of examples and counter-examples to be replaced once again by the more familiar nightmares of github DDOSs or Linus rants.)

-QM
--
Quantum Mechanics: The dreams stuff is made of

  • Comment on Re^3: Pattern matching: Lazy vs. greedy

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-04-18 04:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found