There's more than one way to do things | |
PerlMonks |
Re: When a regexp with /g needs to be run .. twiceby toolic (Bishop) |
on Mar 02, 2018 at 21:28 UTC ( [id://1210263]=note: print w/replies, xml ) | Need Help?? |
Your regex captures the colon into $1 and the left curly brace into $2 the first time through. The g modifier makes it attempt to capture 2 more characters AFTER the left curly brace, but there is only one character remaining (double quote), so the match fails. Just capture one matching character:
In Section
Seekers of Perl Wisdom
|
|