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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^[A-Z0-9]{8}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{12}$
Description
GUID Tester. It tests SQL Server GUIDs, which are alphanumeric characters grouped 8-4-4-4-12 (with the dashes). Make sure they don't have the brackets around them before you check them and have fun!
Matches
4D28C5AD-6482-41CD-B84E-4573F384BB5C | B1E1282C-A35C-4D5A-BF8B-7A3A51D9E388 | 91036A4A-A0F4-43F0-8CD
Non-Matches
{B1E1282C-A35C-4D3A-BF8B-7A3A51D9E388} | AAAAAAAAAAAAAAAAA | B;E1282C-A35C-4D3A-BF8B-7A3A51D9E38
Author Rating: Not yet rated. James Bray
Source http://www.jamesbray.com
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: Invalid hexadecimal values
Name: Dennis Kennedy
Date: 12/24/2005 11:44:15 PM
Comment:
The statement allows invalid hexadecimal values, does not allow valid GUIDs without dashes (acceptable in SQL Server.)


Title: Apologies
Name: Paul Tew
Date: 2/10/2004 11:22:00 AM
Comment:
Sorry my other comment was meant for the regex that allowed curly braces. Oops


Title: Both Brackets
Name: Paul Tew
Date: 2/10/2004 11:19:50 AM
Comment:
It fails if you remove one of the brackeys, but not the other e.g. {9A65399C-0669-11D5-A147-009027FC3AC3 9A65399C-0669-11D5-A147-009027FC3AC3}


Title: Hex values
Name: Olivier aboilard
Date: 5/16/2003 8:10:24 AM
Comment:
Every character scope can be reduced to [A-F0-9] as a GUID is a series of Hexadecimal value... if i'm not mistaken.


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