Skip to content

Instantly share code, notes, and snippets.

@Golly
Created February 7, 2013 07:59
Show Gist options
  • Select an option

  • Save Golly/4729359 to your computer and use it in GitHub Desktop.

Select an option

Save Golly/4729359 to your computer and use it in GitHub Desktop.
Javascript: Regexp, get file name from url
var filename = src.match(/.*\/(.*)$/)[1];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment