Skip to content

Instantly share code, notes, and snippets.

@xcsrz
Created November 23, 2014 07:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xcsrz/49f357a9783e56b8b80f to your computer and use it in GitHub Desktop.
Save xcsrz/49f357a9783e56b8b80f to your computer and use it in GitHub Desktop.
Shortest regex I know to match a guid (reliably)
/^([0-9a-f]){8}(-([0-9a-f]){4}){4}([0-9a-f]){8}$/i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment