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

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:


BUT the url can have:

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"