String Replace

I have a string:

16"H Vertical Ladder 2 Legs
but suppose to be:

Vertical Ladder 2 Legs

I tried:

ereg_replace(“[0-9]”,“”,str_replace(“"H”,“”,$product_info[‘products_name’]))

But the problem is that this way it eliminates 2 before Legs as well
I need eliminate only numbers when they stay together with "H

Try just this:

$product_info['products_name'] = preg_replace("/[0-9]+"H/", ""H", $product_info['products_name']);

Thank you :slight_smile: