import re
rx = re.compile(
    """
                (?:\\b\\w+\\W+){0,4}
                \\b(?:my\\ car)\\b
                """
    , re.VERBOSE)
string = """
my house is painted white, my car is red.
A horse is galloping very fast in the road, I drive my car slowly.
"""
words = rx.findall(string)
Python 3 regex word boundary unclear