Say I have a regex of /\n(\d)+/
.
Let's say I test it against some random text:
aaaaaaaaaa
5aaaaaaaaa
4707aaaaaa
aaaaaaaaaa
923aaaaaaa
Is there a way I can get the number of times \d
was repeated for each match?
I ask this because I'm using regex to do a find and replace on Notepad++ and was hoping I could achieve this end-result:
aaaaaaaaaa
Xaaaaaaaaa
XXXXaaaaaa
aaaaaaaaaa
XXXaaaaaaa