Thanks for reading my post. I need some help to develop a regex to handle a querystring value for location that can be any combo of city, state and zip. In addition to that it would also
have to handle the fact that some users may enter the location differently, i.e. - with a comma and space after city, with a comma, but no space after city, etc. Also, what has to be taken into account is the fact that a browser will change a comma to "%2C" and will change the space character to '+", etc. Also, state can be an abbreviation (e.g. - NY) or fully written out (e.g. - New York)
Below are the different ways a user may enter the location:
location=san+jose%2Cca (city,state, no zip - no space after comma)
location=san+jose%2C+ca (city, state, no zip - with space after comma)
location=san+jose+ca (city, state, no zip - with no comma just a space after city)
location=san+jose%2C+ca+95131 (city, state and zip - comma and space after city)
location=san+jose%2C+california
location=san+jose
location=california
location=95131