in reply to Re^3: Find number of short words in long word
in thread Find number of short words in long word

Overlapping instances of different patterns would match fine. You'd be searching them separately

The problem is when the last few characters of a search pattern are the same as the first few characters, and two matches of the same pattern could overlap... it is those cases where you need the lookaheads.


'ACTACTA' for example; when searching for 'ACTA', should that score two matches or just one?

If you want it to be two, you need the lookaheads. If you want it to be just one match, then the regex pattern is simply 'ACTA', but it sounds like you want the lookaheads.

  • Comment on Re^4: Find number of short words in long word