[fix] Invalid regular expression error

Hi,

I'm getting "Invalid regular expression error", I fixed the problem, and also give a comment for swagger-js team. https://github.com/wordnik/swagger-js/commit/3585286e76418606c55d70e594af07fdcd6c821c#diff-d1af09e04933264dc4012ca378349d99R442