code: def process_match(match, fixed_text, cur, cur_end):
      replace = True
      if match['type'] == 'prefix':
          chk = cur - 1
      else:
          chk = cur_end
      if match['scope'].startswith('!'):
          scope = match['scope'][1:]
          negative = True
      else:
          scope = match['scope']
          negative = False
      if scope == 'punctuation':
          if (not ((chk < 0 and match['type'] == 'prefix') or
                   (chk >= len(fixed_text) and match['type'] == 'suffix') or
                   validate.is_punctuation(fixed_text[chk]))
              ^ negative):
              replace = False
      elif scope == 'vowel':
          if (not (((chk >= 0 and match['type'] == 'prefix') or
                    (chk < len(fixed_text) and match['type'] == 'suffix'))
                   and validate.is_vowel(fixed_text[chk]))
              ^ negative):
              replace =  False
      elif scope == 'consonant':
          if (not (((chk >= 0 and match['type'] == 'prefix') or
                    (chk < len(fixed_text) and match['type'] == 'suffix'))
                   and validate.is_consonant(fixed_text[chk]))
              ^ negative):
              replace = False
      elif scope == 'exact':
          if match['type'] == 'prefix':
              exact_start = cur - len(match['value'])
              exact_end = cur
          else:
              exact_start = cur_end
              exact_end = cur_end + len(match['value'])
          if not validate.is_exact(match['value'], fixed_text, exact_start,
                                   exact_end, negative):
              replace = False
      return replace