<commit_before>export default function match(original, search, replace) {
  // This also works with "startsWithNot" (see below)
  // !search === replace becomes search !== replace
  // original === replace is evaluated before the code below
  if (search === replace || original === replace) {
    return false
  }

  var startsWithNot = search.charAt(0) === '!'
  var startsWithStar = search.charAt(0) === '*'
  var endsWithStar = search.slice(-1) === '*'

  if (startsWithNot) {
    return match(original, search.slice(1), replace)
  }

  if (startsWithStar && endsWithStar) {
    return original.includes(search.slice(1, -1))
  }

  if (startsWithStar) {
    return original.endsWith(search.slice(1))
  }

  if (endsWithStar) {
    return original.startsWith(search.slice(0, -1))
  }

  return original === search
}<commit_msg>Fix for match<commit_after>function match(original, search, replace) {
  // This also works with "startsWithNot" (see below)
  // !search === replace becomes search !== replace
  // original === replace is evaluated before the code below
  if (search === replace || original === replace) {
    return false
  }

  var startsWithNot = search.charAt(0) === '!'
  var startsWithStar = search.charAt(0) === '*'
  var endsWithStar = search.slice(-1) === '*'

  if (startsWithNot) {
    return !match(original, search.slice(1), replace)
  }

  if (startsWithStar && endsWithStar) {
    return original.includes(search.slice(1, -1))
  }

  if (startsWithStar) {
    return original.endsWith(search.slice(1))
  }

  if (endsWithStar) {
    return original.startsWith(search.slice(0, -1))
  }

  return original === search
}

export default match
{'fraction_non_alphanumeric': 0.14705882352941177, 'fraction_numerical': 0.010804321728691477, 'mean_word_length': 3.669467787114846, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6919393', 'n_tokens_mistral': 525, 'n_tokens_neox': 517, 'n_words': 135}