input: Write a python function to count the frequency of each word in a given string.
  assert word_frequency("The apple is red and the banana is yellow.") == {'the': 2, 'apple': 1, 'is': 2, 'red': 1, 'and': 1, 'banana': 1, 'yellow': 1}
  assert word_frequency("Hello world! Hello!") == {'hello': 2, 'world': 1}
  assert word_frequency("Test the function. Test it well.") == {'test': 2, 'the': 1, 'function': 1, 'it': 1, 'well': 1}
output: def word_frequency(s):
      import re
      words = re.findall(r'\b\w+\b', s.lower())
      frequency = {}
      for word in words:
          frequency[word] = frequency.get(word, 0) + 1
      return frequency