When a dash is used in a Javascript RegExp, it needs to be in the last position. In this case, after the percent character.