Я не знаю, обязательно ли вам использовать регулярные выражения, но я бы сделал это следующим образом.
Сначала вы можете получить список слов с помощью метода str.split()
.
>>> sentence = "hello there how are you"
>>> splited_sentence = sentence.split(" ")
>>> splited_sentence
['hello', 'there', 'how', 'are', 'you']
Затем вы можете создавать пары.
>>> output = []
>>> for i in range (1, len(splited_sentence) ):
... output += [ splited[ i-1 ] + ' ' + splited_sentence[ i ] ]
...
output
['hello there', 'there how', 'how are', 'are you']