| Title |
Test
Find
Pattern Title
|
| Expression |
^((?-i:0x)?[A-Fa-f0-9]{32}|
[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}|
\{[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}\})$ |
| Description |
Validates a GUID/UUID, without capture, to the following patterns: [{hhhhhhhh-hhhh-hhhh-hhhh-hhhhhhhhhhhh}],
[hhhhhhhh-hhhh-hhhh-hhhh-hhhhhhhhhhhh],[hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh],[0xhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh], where 'h' is a valid hex character. This last pattern is a binary format commonly used with SQL Server 2000. It allows you to use binary(n) and varbinary(n) parameters that convert well to unique identifier. Please note that this is not case sensitive EXCEPT the 'x' in the binary pattern. It must be lower case. |
| Matches |
6F9619FF-8B86-D011-B42D-00C04FC964FF | 0x6F9619FF8B86D011B42D00C04FC964FF | {6F9619FF-8B86-D011-B42D |
| Non-Matches |
{6F9619FF8B86D011B42D00C04FC964FF} | 0X6F9619FF8B86D011B42D00C04FC964FF |
| Author |
Rating:
Patrick Fogarty
|
| Source |
home-grown |
| Your Rating |
|
Title: Made it work with some adjustments
Name: Anthony Tambrin
Date: 8/26/2009 8:28:37 PM
Comment:
(?-i:0x)?[A-Fa-f0-9]{32}|[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}|{[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}\}
Title: Doesn't work
Name: John Shepard
Date: 10/24/2005 8:38:03 AM
Comment:
Doesn't seem to work correctly.