Skip to content

Instantly share code, notes, and snippets.

@jed
Created January 14, 2010 01:18
Show Gist options
  • Save jed/276760 to your computer and use it in GitHub Desktop.
Save jed/276760 to your computer and use it in GitHub Desktop.
captures = this.pathname.match(
new RegExp( "^(.*)(" + captures.join(")(.*)(") + ")(.*)$" )
).slice( 1 );
captures[ pos * 2 + 1 ] = val;
this.pathname = captures.join("");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment