Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Posts
    349
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Matching a Name value in the URL and How do you?

    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.

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,032
    Thanks
    75
    Thanked 4,325 Times in 4,291 Posts
    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"


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •