Skip to content

Instantly share code, notes, and snippets.

@jed
Created Jan 14, 2010
Embed
What would you like to do?
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