Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

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

by rsFalse (Chaplain)
on Feb 11, 2021 at 22:40 UTC ( [id://11128279]=note: print w/replies, xml ) Need Help??


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

Hm. May some other variants help? Or are they way slower?....
"\G \s*? ^ \s*" # non-greedy
"\G (?= \s* ^ ) \s*" # look-ahead
Upd. And do they reproduce regression?

Upd. May that factoring out of "\s* ^ \s*" help?
{ last if $text =~ /\G \s* \Z/gcmsx; if ($text =~ /\G \s* ^ \s*/gcmsx) { if ($text =~ /\G module \s+ (\S+?) \s* \( \s* (.*?) \s +* \) \s* ;/gcmsx) { $name = $1 } elsif ($text =~ /\G endmodule /gcmsx) { } elsif ($text =~ /\G \S+ \s+ .*? \s* ;/gcmsx) { } else { die "ERROR: unknown syntax\n" } } else { die "ERROR: unknown syntax\n" } redo; }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-04-24 22:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found