Thread
:
Regex question -- All two consecutive words
View Single Post
02-09-2018, 04:32 PM
#
4
Adoby
Handy Elephant
Posts: 1,737
Karma: 26785684
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Samsung Galaxy Tab S8 Ultra
Is this the answer?
(?=(\b\w+\b[,;.\s]*\b\w+\b))
Or possibly...
(?=(\b\w+\b)[,;.\s]*(\b\w+\b))
To get each word in a separate group.
(?= ... ) is the magic dust... Positive lookahead. New for me...
Adoby
View Public Profile
Find More Posts by Adoby
Track Posts by Adoby via RSS