Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: Regex to pull out string within parenthesis that could contain parenthesis

by sundialsvc4 (Abbot)
on Jul 09, 2018 at 22:29 UTC ( #1218199=note: print w/replies, xml ) Need Help??


in reply to Re^2: Regex to pull out string within parenthesis that could contain parenthesis
in thread Regex to pull out string within parenthesis that could contain parenthesis

“However, I do want to point the OP fairly-specifically in this fruitful direction.   Very-carefully explore the possibility of using Parse::RecDescent, letting it drive the show, having been given a grammar that teaches it to “skip over” (without further definition) sections of source-code that are not of interest.

In several very-key ways, P::RD is not implemented in the same way as are classical parsers.   (Hint:   it is centered on regular expressions at all levels ...)   Plus, it translates your grammar into a Perl source program.   This gives you significant opportunities not found elsewhere.

  • Comment on Re^3: Regex to pull out string within parenthesis that could contain parenthesis

Replies are listed 'Best First'.
Re^4: Regex to pull out string within parenthesis that could contain parenthesis
by Your Mother (Bishop) on Jul 09, 2018 at 23:50 UTC

    This is a classic balanced text problem. Why do you persist in recommending a solution without actually recommending a solution, three times now, that drastically complicates the proper answers already given? Answers including one by the author of the module you keep name-dropping who didn't feel it necessary to invoke same.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2019-12-11 14:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?