develooper Front page | perl.perl5.porters | Postings from December 2021

Perl 5 regex issue

Thread Next
From:
Budi
Date:
December 4, 2021 22:39
Subject:
Perl 5 regex issue
Message ID:
CAH0GyZDuYhXabCt8yNMCgkvg=W5=6sp9arMs=cN_fVEpgeF7OA@mail.gmail.com
Why does global regex not work on:

$str='kklmn
;$str=~ s/(?=(kkl))(?(1)\g1|mn)/***/g
print "$str\n"

***mn

only first is processed
What is t point of failure here ?
Please help

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About