Regex question

  • Thread starter Thread starter Marianne
  • Start date Start date
M

Marianne

I have a fairly simple pattern but am stuck on the very end. Simply, it
needs to match any character grouping that is separated by more than a
single space:

This is one group and this is another group and this is a third
group

My regex is:
..+?(?:\s{2,})

The only problem is that the last group isn't captured since it ends with a
line terminator and not 2 or more spaces. So the question is how do I
account for this as well? Thanks.

Marianne
 
Back
Top