Title |
Test
Find
Validate GUID
|
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}(?(2)[}]$|$) |
Description |
This regex will validate a GUID. If the GUID starts with an opening curly bracket, then it must also end in a closing curly bracket. If it does not start with one, then it must not end with one. |
Matches |
778ed84f-2f9c-42b5-b314-4d0e0cde8422, {778ed84f-2f9c-42b5-b314-4d0e0cde8422} |
Non-Matches |
{778ed84f-2f9c-42b5-b314-4d0e0cde8422, 778ed84f-2f9c-42b5-b314-4d0e0cde8422}, 234l3, 23423525w |
Author |
Rating:
Not yet rated.
Charles Forsyth
|
Source |
|
Your Rating |
|
Title: Wrong
Name: Wrong
Date: 8/14/2015 9:13:46 AM
Comment:
a-z is WRONG; a guid only contains a-f (or A-F).