in reply to Are Perl patterns universal?
Did you try it? See perlre/Repeated patterns matching zero-length substringWe can also craft patterns that loop forever (not merely a long time) (well, ignoring stack overflows that is)
#Word boundries are zero-width so the regex engine will never progress my $inf; $inf=qr/\b(??{$inf})/;
Currently, you can mis-use \G to loop forever: 1 while "a" =~ /a|\G/g. Doesn't work in a single list-context ()="a"=~/a|\G/g though.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Are Perl patterns universal?
by sleepingsquirrel (Chaplain) on Nov 09, 2004 at 03:30 UTC |