input: Write a function to extract the 10 most frequent words from a given text using regular expressions and the Counter module.
  assert frequent_words("Hello world! Hello everyone. This is a test. Hello test.") == [('hello', 3), ('test', 2), ('world', 1), ('everyone', 1), ('this', 1), ('is', 1), ('a', 1)]
  assert frequent_words("Python is great. Python is dynamic. Python is fun.") == [('python', 3), ('is', 3), ('great', 1), ('dynamic', 1), ('fun', 1)]
  assert frequent_words("One fish two fish red fish blue fish.") == [('fish', 4), ('one', 1), ('two', 1), ('red', 1), ('blue', 1)]
output: def frequent_words(text):
      import re
      from collections import Counter
      
      # Use regular expressions to find all words, ignoring case
      words = re.findall(r'\b\w+\b', text.lower())
      
      # Count the frequency of each word
      word_counts = Counter(words)
      
      # Get the 10 most common words
      most_common_words = word_counts.most_common(10)
      
      return most_common_words