fix dumb regular expression for karma. copied from websages