import re

def findWholeWord(w1,w2):
	return re.compile(r'\b{0}(?:\W+\w+){{0,10}}\W+{1}\b'.format(w1,w2), flags=re.IGNORECASE).search

test_str = "A Hello, World! program is a computer program that outputs \"Hello, World!\" on a display device. Being a very simple program in most programming languages, it is often used to illustrate to beginning programmers the basic syntax for constructing a working program. It is also used to verify that a language or system is operating correctly."
print(findWholeWord('hello', 'simple'))
        