Title: Problem with dashes
Last modified: May 4, 2022

---

# Problem with dashes

 *  Resolved [misdim](https://wordpress.org/support/users/misdim/)
 * (@misdim)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/problem-with-dashes/)
 * Hello!
 * Lets say that I have a book with ISBN 9789601658810 which is included in the 
   product description.
    If I search for the book with the ISBN, it shows the correct
   book as a result if I type 9789601658810 or 978-960-165881-0 But if I type it
   like this 978-960-16-5881-0 it shows 2 other irrelevant books and not the right
   one at all.
 * And the problem is that the correct formats for the ISBN is 9789601658810 (which
   is working fine at the search) or 978-960-16-5881-0 (which is not fetching the
   right book as a result)
 * Thanks in advance!

Viewing 1 replies (of 1 total)

 *  [Kris](https://wordpress.org/support/users/c0nst/)
 * (@c0nst)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/problem-with-dashes/#post-15628287)
 * Hi [@misdim](https://wordpress.org/support/users/misdim/)
 * You can try to remove dashes from the phrase before it goes to the search engine.
 *     ```
       add_filter( 'dgwt/wcas/phrase', function ( $phrase ) {
         $phrase = str_replace( '-', '', $phrase );
         return $phrase;
       } );
       ```
   
 * You have two ways to add this code to your theme:
    Open the functions.php in 
   your child theme and add the code at the end. or install the [Code Snippets](https://wordpress.org/plugins/code-snippets/)
   plugin and apply this code as a snippet.
 * Regards,
    Kris

Viewing 1 replies (of 1 total)

The topic ‘Problem with dashes’ is closed to new replies.

 * ![](https://ps.w.org/ajax-search-for-woocommerce/assets/icon-256x256.png?rev=
   2883754)
 * [FiboSearch - Ajax Search for WooCommerce](https://wordpress.org/plugins/ajax-search-for-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ajax-search-for-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ajax-search-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/ajax-search-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ajax-search-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ajax-search-for-woocommerce/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Kris](https://wordpress.org/support/users/c0nst/)
 * Last activity: [4 years, 1 month ago](https://wordpress.org/support/topic/problem-with-dashes/#post-15628287)
 * Status: resolved