![]() |
|
Welcome to the Monastery | |
PerlMonks |
Re: Can't figure out why capture group is not output by substitution regexby Eily (Monsignor) |
on Aug 24, 2020 at 15:57 UTC ( #11121037=note: print w/replies, xml ) | Need Help?? |
I can fix this by assigning $2 go a new scalar variable first and then using the new variable.Or simply $here =~ s/(^(#+)\s.*?\g2)/$1 =~ s|\n||rg/mse;
In Section
Seekers of Perl Wisdom
|
|