input: from typing import Optional
  
  def match_numeric_strings(string: str) -> Optional[str]:
      """ Match a given string against a regular expression to check if it is a numeric string.
      Return the matched string if it is a numeric string, otherwise return None.
      >>> match_numeric_strings("123456789")
      '123456789'
      >>> match_numeric_strings("abc123")
      None
      """
      import re
      pattern = '^[0-9]+$'
      result = re.match(pattern, string)
      if result:
          return string
      else:
          return None
output:     import re
      pattern = '^[0-9]+$'
      result = re.match(pattern, string)
      if result:
          return string
      else:
          return None