input: Write a python function to find the top N most common words in a given string.
  assert top_n_common_words("The quick brown fox jumps over the lazy dog.", 5) == [('the', 2), ('quick', 1), ('brown', 1), ('fox', 1), ('jumps', 1)]
  assert top_n_common_words("Hello world! Hello everyone. Hello Python.", 2) == [('hello', 3), ('world!', 1)]
  assert top_n_common_words("Test the function with multiple words, with some words repeated.", 3) == [('with', 2), ('words', 2), ('test', 1)]
output: def top_n_common_words(s, N):
      from collections import Counter
      import re
  
      # Convert to lowercase and use regex to find words
      words = re.findall(r'\b\w+\b', s.lower())
      
      # Count the frequency of each word
      word_counts = Counter(words)
      
      # Get the most common N words
      common_words = word_counts.most_common(N)
      
      return common_words