For the given string “the fox jumped over the rabbit” the following string are considered sequential word groupings
the fox jumped over the rabbit,
the fox jumped over the,
the fox jumped over,
the fox jumped,
the fox,
fox jumped over the rabbit,
fox jumped over the,
fox jumped over,
fox jumped,
jumped over the rabbit,
umped over the,
jumped over,
over the rabbit,
over the,
the rabbit
Can anyone suggest or provide a suitable regex. I have tried several variations of
\b\w*\b\s+(\b\w*+\b\s?
but I can’t seem to get an expression which returns the complete expected result set.
Regards,
SOliver.
Codepad: http://codepad.org/E4rywXD8