Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: pattern matching with large regex

by lidden (Curate)
on Aug 13, 2005 at 21:46 UTC ( [id://483612]=note: print w/replies, xml ) Need Help??


in reply to Re^2: pattern matching with large regex
in thread pattern matching with large regex

In your 'one_large' example you get the first match. In 'many_small' you get the last one, try adding a last when you get a match in the for loop and see what happens.

Replies are listed 'Best First'.
Re^4: pattern matching with large regex
by Anonymous Monk on Aug 13, 2005 at 22:10 UTC
    Nice catch but last won't help here because a match will be the exception. Most of the time we check it all and fail to match, but in production last definitely belongs there.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-20 04:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found