Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Can't figure out why capture group is not output by substitution regex

by hippo (Bishop)
on Aug 24, 2020 at 15:49 UTC ( #11121036=note: print w/replies, xml ) Need Help??


in reply to Can't figure out why capture group is not output by substitution regex

I'm not sure why I have to do that.

You have to do it because your second (inner) s/// resets the capture groups.


🦛

  • Comment on Re: Can't figure out why capture group is not output by substitution regex
  • Download Code

Replies are listed 'Best First'.
Re^2: Can't figure out why capture group is not output by substitution regex
by nysus (Parson) on Aug 24, 2020 at 16:14 UTC

    Ah, of course. Thanks.

    $PM = "Perl Monk's";
    $MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar";
    $nysus = $PM . ' ' . $MCF;
    Click here if you love Perl Monks

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (8)
As of 2021-11-30 08:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?