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

Re: regex gotcha moving from 5.8.8 to 5.30.0?

by kschwab (Vicar)
on Feb 10, 2021 at 01:34 UTC ( #11128162=note: print w/replies, xml ) Need Help??


in reply to regex gotcha moving from 5.8.8 to 5.30.0?

I suspect it's \G and all the matching groups. Do you have some sample data and a description of what you're trying to do? There may be a way to do it without all the backrefs.

  • Comment on Re: regex gotcha moving from 5.8.8 to 5.30.0?

Replies are listed 'Best First'.
Re^2: regex gotcha moving from 5.8.8 to 5.30.0?
by AnomalousMonk (Bishop) on Feb 10, 2021 at 03:48 UTC
    There may be a way to do it without all the backrefs.

    I don't understand. There don't seem to be any backreferences in any of the regexes presented so far. Can you please clarify?


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

      Bad terminology. I mean the \G having to refer back to the last match.
        ... \G having to refer back to the last match.

        IIUC, the \G anchor refers to the pos of the string against which the match is being attempted (the pos from a previous, unsuccessful match attempt having been preserved by the /c modifier), and so should should be pretty cheap/quick. Is your experience otherwise?


        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://11128162]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (1)
As of 2021-09-26 13:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?