Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: Skip quoted string in regex

by LanX (Saint)
on Nov 09, 2015 at 20:59 UTC ( [id://1147292]=note: print w/replies, xml ) Need Help??


in reply to Re: Skip quoted string in regex
in thread Skip quoted string in regex

Some background...

> In the qq(failure_reason <> 'Response=X') example given, you only actually want to split once.)

I had the same idea but 3 seemed right, since 3 fields are returned.

It's a bit confusing, b/c according to the docs "LIMIT... represents the maximum number of fields the EXPR will be split into".

But the middle field originates from the (regex-group) within the $opr_regex.

But still, split is the wrong approach here, b/c the LHS could be quoted too.

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

Replies are listed 'Best First'.
Re^3: Skip quoted string in regex
by AnomalousMonk (Archbishop) on Nov 09, 2015 at 22:25 UTC
    ... the LHS could be quoted too.

    I missed that bit in your reply. I was thinking of responding with a semi-elaborate regex approach, but if there's an SQL parser available on CPAN, I agree that's the way to go: wheel, reinvention, and all that.


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

Log In?
Username:
Password:

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

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

    No recent polls found