I’m using the instance id as a unique identifier in a url. I write the instance id to a database, then when it’s in the url string, I an do a query and get the record associated with that instance id. The problem is that instance Id’s have characters that are causing problems with the url and with the database query (=, /, [space], etc.). I know I can use URLEncode, but that’s still causing problems with the database storage. I like the fact that the instance id is long and not easily guessable. I’ve tried Replace, but I would have to do it multiple times and I’d have to know every character that might show up in the instance id that I would have to replace. What’s the best way to clean up the instance ID so it only contains the same characters you would find in, say, a UUID?