input: Write a function to extract all public email addresses from a given string using a regular expression. If the string contains no emails, the function should return an empty list.
  assert extract_emails("My email is john@example.com and yours is john@gmail.com.")==["john@example.com", "john@gmail.com"]
  assert extract_emails("No emails here")==[]
output: import re
  
  def extract_emails(text):
      pattern = r'\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b'
      return re.findall(pattern, text)