December 14, 2013 at 6:06 pm #158362
It’s late and I’m sleepy so not sure if this is the best solution, but this RegEx should work
/([^:]\/)\//g, use it like:
s = s.replace(/([^:]\/)\//g, '$1');
Basically it replaces every
/ as long as it’s not preceded by a colon (like in
Not jQuery, but I don’t think jQuery got any helper functions for this anyway. Curious about use cases though.