regex url matching causes freeze

According to v8 engine https://code.google.com/p/v8/issues/detail?id=2655, it will cause freeze when matching url. I think we should use this pattern https://gist.github.com/dperini/729294 instead of current one.