simplifies tos/(\s+)\w/${1}_/g
Now you can use a zero-width lookbehind to get the speed boost of avoiding captures.s/(\s)\w/${1}_/g
Or in 5.10+:s/(?<=\s)\w/_/g
s/\s\K\w/_/g
In reply to Re^4: is (?: ... ) capturing
by ikegami
in thread is (?: ... ) capturing
by jeanluca
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |