According to [the ietf working draft](http://tools.ietf.org/id/draft-abarth-origin-03.html#ua-behavior) the UA behavior should be conforming to [RFC 3986](http://www.ietf.org/rfc/rfc3986.txt) regarding the proper URI format which (without more testing on my own) this [doc](http://archive.mattfarina.com/2009/01/08/rfc-3986-url-validation/) seems to support your claim. Are you aware of a sure fire RFC 3986 regex to take its place? I will have to test this a bit but I found one that seems to conform on [stack overflow](http://stackoverflow.com/questions/7003416/validating-a-url-in-php)

```^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?```