in reply to Re^2: regex issue
in thread regex issue

Small correction, you missed a word-boundary assertion in the look-ahead. The regex should be:
/\b(\w\w\w)\b(?=.*\b\1\b)/g
Without the additional \b before \1, three-letter words that are trailing substrings of other words would also match.

Replies are listed 'Best First'.
Re^4: regex issue
by ExReg (Priest) on Aug 03, 2016 at 20:25 UTC

    Thanks. I missed that copying from the PC that has perl that I tested this on to this one.