fixed regexp to be 1.8.7 friendly