I'm not sure why I have to do that.
You have to do it because your second (inner) s/// resets the capture groups.
🦛
In reply to Re: Can't figure out why capture group is not output by substitution regex
by hippo
in thread Can't figure out why capture group is not output by substitution regex
by nysus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |