Skip to content

Instantly share code, notes, and snippets.

@Torvin
Created December 2, 2016 03:16
Show Gist options
  • Save Torvin/698a6c92dff573cb2ef88a474e8f1553 to your computer and use it in GitHub Desktop.
Save Torvin/698a6c92dff573cb2ef88a474e8f1553 to your computer and use it in GitHub Desktop.

To convert a UUID in the 00000000-0000-0000-0000-000000000000 format to the format DEFINE_GUID macro uses

regexp: (.{8})-(.{4})-(.{4})-(..)(..)-(..)(..)(..)(..)(..)(..)

replace: with 0x$1, 0x$2, 0x$3, 0x$4, 0x$5, 0x$6, 0x$7, 0x$8, 0x$9, 0x${10}, 0x${11}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment