Skip to content

Instantly share code, notes, and snippets.

@hs0ucy
Created September 13, 2012 12:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hs0ucy/3714034 to your computer and use it in GitHub Desktop.
Save hs0ucy/3714034 to your computer and use it in GitHub Desktop.
RegEx image type: Expression régulière qui cible les chaînes se terminant par .jpg, .png ou .gif
var $that = $(this), //Object $imgLnk
imgURL = $that.attr("href"), //Récupérer l'URL de ce lien.
imgFormat = /\.(jpg|jpeg|png|gif)$/ig;
imgURL.match(imgFormat);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment