Regular expression fix for end-of-line matching and URI.decoding iids