def test_replacements(clip_str, path_exists):
  replaced_str = clip_str
  for find_regex, replace_str in conf.find_replace_map:
    replaced_str = re.sub(find_regex, replace_str, replaced_str)

  match = re.search(
    #                 file extension
    #    path               |
    #     |                 |
    r'((?:~|/)[^@^:^\\^\(]+\.[a-z]{2,3}).*(?:line.*?|\()([0-9]+)', replaced_str)
  if match and path_exists(os.path.expanduser(match.group(1))):
    return ':'.join([match.group(1), match.group(2)])

  match = re.search(
    #                file extension
    #   path              |
    #    |                |
    r'((?:~|/)[^@^:^\\^\(]+\.[a-z]{2,3}):([0-9]+)', replaced_str)
  if match and path_exists(os.path.expanduser(match.group(1))):
    return ':'.join([match.group(1), match.group(2)])