Refactor URI character class functions

To use array lookup instead of boolean OR expressions