Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Advanced techniques with regex quantifiers

by smls (Friar)
on Jul 19, 2015 at 21:52 UTC ( [id://1135383]=note: print w/replies, xml ) Need Help??


in reply to Re: Advanced techniques with regex quantifiers
in thread Advanced techniques with regex quantifiers

For me your code fails with:

Invalid quantifier in {,} in regex; marked by <-- HERE in m/.{ <-- HER +E 004}/ at -e line 1.

Similarly for my own example code if I leave out the integer coercion.

This is with Perl 5.22.
Is this a regression then?

Update: I annotated the quoted sentence in the article with a link to this discussion.

Replies are listed 'Best First'.
Re^3: Advanced techniques with regex quantifiers
by AnomalousMonk (Archbishop) on Jul 20, 2015 at 00:21 UTC
    For me your code fails […] with Perl 5.22. Is this a regression then?

    So it would seem. Apparently I need to take a look at the deltas.


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

      Hello AnomalousMonk,

      Your code works fine for me in Perl 5.20.2, but breaks in Perl 5.22.0 with the runtime error reported by smls. perl5220delta has the following in its New Diagnostics section:

      (Note: the (F) here indicates a fatal but trappable error.)

      So it seems that leading zeroes in a quantifier were always meant to be considered an error, but were previously overlooked?

      Hope that helps,

      Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-04-18 00:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found