Not parser, but matcher.
http://medialize.github.io/URI.js/docs.html#static-withinString
Does it handle all we want?