detecting repeating hyphens in url rewrite
I have a website that has a changing url to be rewritten according to the name of the product or a navigation name.
I have to distinguish between navigation names and product names that have to be redirected to two diffrent pages.
Lets say that one of my navigations is 'Beautiful flowers'. Then that would be redirected as www.exp.com/beautiful-flowers/ to navigation.php.
But i also have product names that has to be distinguished like that but they can change beacuse the customer gives names to products with cms.
It could be 'Red Rose' or 'Beautiful Desert Red Rose' or just 'Rose' and that product has to be redirected to products.php.
I guess my question is, what would be the pattern that would search a string with unknown number of hyphens?
Thank you in advance