What I want to do is check for duplicated words right next to each other but even if there is punctuation in between.
For example:
Vivamus Vivamus diam, diam, Vivamus Vivamus diam, diam Vivamus
there should be 4 distinct hits here.
I can't figure out why this isn't working; can someone explain why and show me what the correct code should be?
thanks.
(\w*(?:[ ,\.])*?)\1
PS: due to the confusion it causes, I'm not going to say that I'm using the Perl engine.