input: Write a python function to validate email addresses using regex.
  assert is_valid_email("john@example.com") == True
  assert is_valid_email("invalid-email") == False
  assert is_valid_email("jane.doe@domain.co") == True
  assert is_valid_email("user@sub.domain.com") == True
  assert is_valid_email("user@domain") == False
output: def is_valid_email(email):
      import re
      pattern = r'^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$'
      return re.match(pattern, email) is not None