Title |
Test
Find
Pattern Title
|
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}$ |
Description |
GUID Tester.
This is a modification from the regular expression submitted by James Bray ([email protected]). It allows the use of mixed upper and lowercase letters in the GUID string. |
Matches |
BFDB4D31-3E35-4DAB-AFCA-5E6E5C8F61EA | BFDB4d31-3e35-4dab-afca-5e6e5c8f61ea |
Non-Matches |
qqqBFDB4D31-3E35-4DAB-AFCA-5E6E5C8F61EA | BFDB4D31-3E-4DAB-AFCA-5E6E5C8F61EA | BFDB4D31-3E35-4DAB-AF |
Author |
Rating:
Not yet rated.
V. Lorz
|
Source |
(Original version obtained from Regular Expression Library) |
Your Rating |
|
Title: Correction
Name: Pranav H
Date: 3/5/2010 9:18:46 AM
Comment:
GUIDs contain only hexadecimal characters, so replace all Z with F and z with f
The regex becomes
^[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}$