input: def extract_emails(text: str) -> list:
      """
      Extract all public email addresses from a given string using regular expression.
      >>> extract_emails("My email is john@example.com and yours is john@gmail.com.")
      ['john@example.com', 'john@gmail.com']
      """
output:     import re
      pattern = r'[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}'
      return re.findall(pattern, text)