import re


def check_word(word, string):
    """
        function will check if the word exists in a string
        uses word boundary for search
        word: is the word to be searched
        string: string to perform the operation on
    """
    regexStr = re.search(r'(\b%s\b)' % word, string)
    if regexStr is not None:
        return True

    return False