Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: regex gotcha moving from 5.8.8 to 5.30.0?

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


in reply to Re^2: regex gotcha moving from 5.8.8 to 5.30.0?
in thread regex gotcha moving from 5.8.8 to 5.30.0?

Bad terminology. I mean the \G having to refer back to the last match.
  • Comment on Re^3: regex gotcha moving from 5.8.8 to 5.30.0?

Replies are listed 'Best First'.
Re^4: regex gotcha moving from 5.8.8 to 5.30.0?
by AnomalousMonk (Bishop) on Feb 10, 2021 at 04:04 UTC
    ... \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:  <%-{-{-{-<

      No, but it's a regression, and seems to be narrowed down somewhere in:
      $text =~ /\G \s* ^ \s* begfoo \s+ (\S+?) \s* \( \s* (.*?) \s +* \) \s* ;/gcmsx
      And it sounds like replacing .*? with [^;]*? was tried.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2022-01-27 08:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (70 votes). Check out past polls.

    Notices?