Your regex is wrong:
preg_replace(array("/attr/price_range_[0-9_]+/", "", $actual_link)
As you are using the forward slash /
as the delimiter, you need to escape it or use a different delimiter:
preg_replace(array("/\/attr\/price_range_[0-9_]+/", "", $actual_link)
or
preg_replace(array("#/attr/price_range_[0-9_]+#", "", $actual_link)