Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

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

by sundialsvc4 (Abbot)
on Jul 09, 2018 at 22:22 UTC ( #1218198=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

“Unfortunately, they fairly-frisked me at the door.”   (It was a [rightfully ...] very security-conscious insurance company.)   So in this case I really don’t have any source code ... ;-) ... that I could specifically offer as an example, and it wouldn’t exactly qualify as a “forum post” even if I did.

The thing that is both very-unique and very-nice about this particular module is that it actually does all of its magick within the Perl context, generating on-the-fly Perl source-code corresponding to your grammar and then magically executing it.   (Holy Moose, Batman!)   Therefore, you actually can construct grammars that “surf over” blocks of irrelevant source-code in search of the things that matter, without having to write grammars that describe everything in-between.

I wish that I could feel free to be more specific ... but there are NDAs ...

  • 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 AnomalousMonk (Bishop) on Jul 10, 2018 at 00:50 UTC
    ... in this case [a very security-conscious insurance company] I really donít have any source code ... I wish that I could feel free to be more specific ... but there are NDAs ...

    This is PerlMonks. There are no NDAs. There is no need to post thousands of lines of code. I can only repeat that there is the OP with an example string and a fairly clear (update: and simple) problem statement. There is Parse::RecDescent, which is open source if open source exists in the world. It may have been a few years since you've used it, but I feel confident that you can review this module and pretty quickly reacquaint yourself with the techniques it embodies. You have, in addition, "experience with other parsers" to draw upon.

    So can you please take a few minutes and compose and post a parser | a simple parser to address the requirements of the OP? As I've said, I think that such an example would be a valuable contribution to the discussion.


    Give a man a fish:  <%-{-{-{-<

Re^4: Regex to pull out string within parenthesis that could contain parenthesis
by Your Mother (Bishop) on Jul 09, 2018 at 23:47 UTC
    I wish that I could feel free to be more specific

    COGTFO.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (10)
As of 2019-12-05 15:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (151 votes). Check out past polls.

    Notices?