I struggled similarly until SO likewise rescued me from frustration. It looks like lastIndex can increment by 4 since the earliest overlaps start at the last two characters of six character sequences.
Actually I had to struggle a bit until using that trick. I read all the documentation I could find about regexes and finally found something similar in StackOverflow. Regexes are so powerful! :)
You are completely right This would improve a bit the performance.
Thanks for the tip! :)
I struggled similarly until SO likewise rescued me from frustration. It looks like lastIndex can increment by 4 since the earliest overlaps start at the last two characters of six character sequences.
I'm glad you liked it! :)
Actually I had to struggle a bit until using that trick. I read all the documentation I could find about regexes and finally found something similar in StackOverflow. Regexes are so powerful! :)
hehe thanks, getting better at regex :)
Thanks for your info- it's submitted again;-)!
For the last test:
say == ''
.