input: Write a function to match a given string against a specified regular expression pattern and print whether the string is a valid match or not.
  assert custom_regex('^[0-9]+$', '123456789')=="String is a valid numeric string"
  assert custom_regex('^[0-9]+$', 'abc123')=="String isn't a valid numeric string"
  assert custom_regex('^[a-z]+$', 'abcdefg')=="String is a valid string"
  assert custom_regex('^[a-z]+$', '123abc')=="String isn't a valid string"
  assert custom_regex('^[0-9]+$', '')=="String isn't a valid numeric string"
output: import re
  
  def custom_regex(pattern, string):
      if re.match(pattern, string):
          if pattern == '^[0-9]+$':
              return "String is a valid numeric string"
          elif pattern == '^[a-z]+$':
              return "String is a valid string"
      else:
          if pattern == '^[0-9]+$':
              return "String isn't a valid numeric string"
          elif pattern == '^[a-z]+$':
              return "String isn't a valid string"