input: from typing import List
  
  
  def extract_emails(text: str) -> List[str]:
      """ Extract all public email addresses from a given string using a 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)
  