Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luisabarca/760bd0d53623ec99ffec2c74d1e86921 to your computer and use it in GitHub Desktop.
Save luisabarca/760bd0d53623ec99ffec2c74d1e86921 to your computer and use it in GitHub Desktop.
Regexp for valid instagram username
# Regex by Jonathan Stassen. http://blog.jstassen.com/2016/03/code-regex-for-instagram-username-and-hashtags
/(?:@)([A-Za-z0-9_](?:(?:[A-Za-z0-9_]|(?:\.(?!\.))){0,28}(?:[A-Za-z0-9_]))?)/g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment