Friday, April 20, 2012

how to Find base name in URL in Javascript

Simply use this regex : 

url.replace(/^.*\/|\.[^.]*$/g, '')


No comments:

Post a Comment