Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re: Extracting a parenthesized fragment from a string

by almut (Canon)
on Sep 11, 2009 at 11:38 UTC ( #794758=note: print w/replies, xml ) Need Help??

in reply to Extracting a parenthesized fragment from a string

Maybe you could use Text::Balanced instead? (in particular extract_bracketed())

Module::CoreList says it's a core module since:

$ corelist Text::Balanced Text::Balanced was first released with perl 5.007003

(IOW, for 5.6 you'd have an additional dependency...)

Replies are listed 'Best First'.
Re^2: Extracting a parenthesized fragment from a string
by fce2 (Sexton) on Sep 11, 2009 at 12:49 UTC

    I'd forgotten about this module, but yes, it could probably do quite well. I'll try a couple of implementations based on the different ideas that have been presented here and see how they compare for readability, speed, and so forth. Cheers!

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2022-08-10 22:41 GMT
Find Nodes?
    Voting Booth?

    No recent polls found