Created
March 11, 2023 21:41
-
-
Save ThiagodePaulaSouza/28e3bdca9d366cecb97254709e0237ec to your computer and use it in GitHub Desktop.
regex que identifica GUIDs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const rxGuid = new RegExp('[({]?[a-fA-F0-9]{8}[-]?([a-fA-F0-9]{4}[-]?){3}[a-fA-F0-9]{12}[})]?','g') | |
rxGuid.test('f2373f76-79e6-4c80-b148-18c498b62b62') //true | |
rxGuid.test('ihafsh-sfa-012a3129832-9has-jkhdasjk') //false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment