Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^4: Is it safe to use external strings for regexes? (infinite loops)

by LanX (Saint)
on Oct 11, 2021 at 15:36 UTC ( [id://11137420]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Is it safe to use external strings for regexes? (infinite loops)
in thread Is it safe to use external strings for regexes?

dunno, I just RTFM and copied it here! :)

maybe some delta fixed it?

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^5: Is it safe to use external strings for regexes? (infinite loops)
by choroba (Cardinal) on Oct 11, 2021 at 15:40 UTC
    Maybe. It doesn't loop even on 5.16.3 which is the oldest Perl easily available to me.

    Update: 5.10.1 neither.

    Update2: It loops in 5.6.2!

    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
      I always thought we need tests for snippets in perldocs too.

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery

Re^5: Is it safe to use external strings for regexes? (infinite loops)
by AnomalousMonk (Archbishop) on Oct 11, 2021 at 17:56 UTC

    Nor on 5.8.9:

    Win8 Strawberry 5.8.9.5 (32) Mon 10/11/2021 13:52:47 C:\@Work\Perl\monks >perl -wMstrict -le "my $f = 'foo'; print pos $f while $f =~ m{ ( o? ) +* }gx;" 0 3 3


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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-03-28 08:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found