Javascript replace

Posted by Webby on Stack Overflow See other posts from Stack Overflow or by Webby
Published on 2010-06-12T11:58:03Z Indexed on 2010/06/12 12:02 UTC
Read the original article Hit count: 287

Hello struggling here guys..

Is it possible to string replace anything between the the first forward slashes with "" but keep the rest?

e.g. var would be

string "/anything-here-this-needs-to-be-replaced123/but-keep-this";

would end up like this

string "/but-keep-this";

Hope that made sence

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about string-manipulation