...

View Full Version : Matching a Name value in the URL and How do you?



BrightNail
03-16-2009, 10:14 PM
I need to extract "name" from the URL that is case insensitive.

For instance, lets say I wanted to find the following in the url:

WT.nn_iz

BUT the url can have:
www.someplace.com?x=abc&y=def&wT.NN_iz=009

How can I extract the: wT.NN_iz and put that in a variable?

The reason being is that users can link to my site with that in case insensitive, so I have to be able to identify "WT.nn_iz" no matter how it comes in.

Old Pedant
03-16-2009, 10:59 PM
Several ways.

Perhaps easiest is to just force the string to all upper or all lower case and then search for the name in just that one case.

You can use stringName = stringName.toLowerCase(); for example. And then search for "wt.nn_iz"



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum