[jQuery] Replace URL parameters

2010-02-10 Thread Jakub
Hello there!
I have function:

function Dummy(){
  adress = window.location.href;
  regex = /^(.*?)?$/;
  adress = adress.replace(regex,'');
  alert(adress);
}

I want to replace all parameters, but first. I don't know what is
wrong .. :-(


Re: [jQuery] Replace URL parameters

2010-02-10 Thread Nathan Klatt
On Wed, Feb 10, 2010 at 5:48 AM, Jakub j.kucharo...@gmail.com wrote:
 I want to replace all parameters, but first. I don't know what is
 wrong .. :-(

Could you give an example of what you want to happen? I.e., an input
string and what you want it to look like after the replace?

Nathan


Re: [jQuery] Replace URL parameters

2010-02-10 Thread Nathan Klatt
On Wed, Feb 10, 2010 at 5:48 AM, Jakub j.kucharo...@gmail.com wrote:
    function Dummy(){
      adress = window.location.href;
      regex = /^(.*?)?$/;
      adress = adress.replace(regex,'');
      alert(adress);
    }

One problem is you don't want to put quotes around the regex.

Nathan