Getting the number of repetitions in a regular expression
Let's say that I have a regex /\n(\d)+/
.
Let's say I test it for random text:
aaaaaaaaaa
5aaaaaaaaa
4707aaaaaa
aaaaaaaaaa
923aaaaaaa
Is there a way to get the number of times \d
for each match?
I am asking this because I am using a regular expression for find and replace in Notepad ++ and I hope I can achieve this end result:
aaaaaaaaaa
Xaaaaaaaaa
XXXXaaaaaa
aaaaaaaaaa
XXXaaaaaaa
+2
source to share