<commit_before>module PageModels
  class CategoryPage < PageModels::BlinkboxbooksPage
    set_url "/#!/category"
    set_url_matcher /category/
    element :category_books, '#category'
    sections :book_results_sections, BookResults,'[data-test="search-results-list"]'
    element :category_name, '[data-test="category-title"]'

    def show?(category_name)
      category_url = category_name.downcase.gsub(/&|'|and|,/, '').gsub(/ +/, '-')
      current_url.include?(category_url)
    end
  end



  register_model_caller_method(CategoryPage)
end<commit_msg>CWA-1456 small improvement of regexp<commit_after>module PageModels
  class CategoryPage < PageModels::BlinkboxbooksPage
    set_url "/#!/category"
    set_url_matcher /category/
    element :category_books, '#category'
    sections :book_results_sections, BookResults,'[data-test="search-results-list"]'
    element :category_name, '[data-test="category-title"]'

    def show?(category_name)
      category_url = category_name.downcase.gsub(/[&',]|and/, '').gsub(/ +/, '-')
      current_url.include?(category_url)
    end
  end

  register_model_caller_method(CategoryPage)
end
{'fraction_non_alphanumeric': 0.13784021071115013, 'fraction_numerical': 0.003511852502194908, 'mean_word_length': 4.643564356435643, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6265988', 'n_tokens_mistral': 371, 'n_tokens_neox': 364, 'n_words': 59}