I think primes is really cool!
I would like to fully understand how it works and I have 2 questions about the second part of the regex:
1. why isn't (xx+) greedy? I mean why doesn't it match the whole string of x in $_?
2. I thought it was possible substitute \1 with $1: ^(xx+)$1+$, but this regex doesn't work correctly. why?
TIA for any explanation.
marcos