Skip to content

Instantly share code, notes, and snippets.

@ik5
Last active May 26, 2016 09:02
Show Gist options
  • Save ik5/cc90f6569d0ce04aac9e54c4fe9a7877 to your computer and use it in GitHub Desktop.
Save ik5/cc90f6569d0ce04aac9e54c4fe9a7877 to your computer and use it in GitHub Desktop.
small regex to find a uuid in a sting
puts $1 if str =~ /([a-fA-F\d]{8}(-[a-fA-F\d]{4}){3}-[a-fA-F\d]{12}?)/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment