Title: Dealing with Hypens (-)
Last modified: August 21, 2016

---

# Dealing with Hypens (-)

 *  Resolved [csumrell](https://wordpress.org/support/users/csumrell/)
 * (@csumrell)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/dealing-with-hypens/)
 * Hi,
 * I am using the plugin on a woocommerce build with a lot of products. Their names
   are usually hyphenated such as E-7S or NH-201. I have configured it to where 
   searching E-7S or E 7S (or NH 201, NH-201) will show results. However if the 
   user searches something like E7S or NH201 (without space or dash) then it shows
   no results. Is there any way to get this to work without the space or dash? I
   have already tried synonyms and it didn’t seem to work (Example “e7s=e-7s”)
 * Thank you for your time
 * [https://wordpress.org/plugins/relevanssi/](https://wordpress.org/plugins/relevanssi/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [csumrell](https://wordpress.org/support/users/csumrell/)
 * (@csumrell)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/dealing-with-hypens/#post-4719948)
 * nvm, did a search in the meantime and this solved my problem
 * add_filter(‘relevanssi_remove_punctuation’, ‘hyphensoff’, 9);
    function hyphensoff(
   $str) { return str_replace(‘-‘, ”, $str); }

Viewing 1 replies (of 1 total)

The topic ‘Dealing with Hypens (-)’ is closed to new replies.

 * ![](https://ps.w.org/relevanssi/assets/icon-256x256.png?rev=3529670)
 * [Relevanssi - A Better Search](https://wordpress.org/plugins/relevanssi/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/relevanssi/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/relevanssi/)
 * [Active Topics](https://wordpress.org/support/plugin/relevanssi/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/relevanssi/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/relevanssi/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [csumrell](https://wordpress.org/support/users/csumrell/)
 * Last activity: [12 years, 1 month ago](https://wordpress.org/support/topic/dealing-with-hypens/#post-4719948)
 * Status: resolved