RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Valid GUID (VBScript)
Expression
^[{][A-Za-z0-9]{8}-[A-Za-z0-9]{4}-[A-Za-z0-9]{4}-[A-Za-z0-9]{4}-[A-Za-z0-9]{12}[}]$|^[A-Za-z0-9]{8}-[A-Za-z0-9]{4}-[A-Za-z0-9]{4}-[A-Za-z0-9]{4}-[A-Za-z0-9]{12}$
Description
This RegEx validates a GUID number with or without curly brackets. But requires both brackets if any is provided. This version is compatible with VBScript's RegEx engine
Matches
778ed84f-2f9c-42b5-b314-4d0e0cde8422, {778ed84f-2f9c-42b5-b314-4d0e0cde8422}
Non-Matches
778ed84f-2f9c-42b5-b314-4d0e0cde8422}, {778ed84f-2f9c-42b5-b314-4d0e0cde8422
Author Rating: Not yet rated. Charles Forsyth
Source
Your Rating
Bad Good

Enter New Comment

Title
 
Name
 
Comment
 
Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: Wrong
Name: Wrong
Date: 8/14/2015 9:15:40 AM
Comment:
a-z is WRONG. A GUID only contains a-f / A-F


Title: GUID is a HEX
Name: peleg
Date: 9/7/2010 1:56:55 AM
Comment:
so the range should be a-f and not a-z!!!


Copyright © 2001-2018, RegexAdvice.com | ASP.NET Tutorials