import re


def calc_word_frequency(my_string, my_word):
    """Calculate the number of occurrences of a given word in a given string.

    Args:
        my_string (str): String to search
        my_word (str): The word to search for

    Returns:
        int: The number of occurrences of the given word in the given string.

    """

    # Remove all non alphanumeric characters from the string
    filtered_string = re.sub(r'[^A-Za-z0-9 ]+', '', my_string)

    # Return the number of occurrences of my_word in the filtered string
    return filtered_string.split().count(my_word)