input: Write a python function to check if a string matches a given pattern using regular expressions.
  assert check_pattern("ABCDDEFG", "AB*EFG") == True
  assert check_pattern("ABCDEFG", "AB*EFG") == True
  assert check_pattern("AABCDDEFG", "AB*EFG") == False
output: import re
  
  def check_pattern(string, pattern):
      pattern = pattern.replace("*", ".*")
      return bool(re.fullmatch(pattern, string))