Regular Expression for GUID and How to Test

In a web test, I had to extract the GUID that was part of a dynamically generated input field in ASP.NET. This is a regular expression that matches GUIDs:


(The (?:…) denotes a non-capturing group.)

To find the right GUID and extract it using a capturing group, I had to use the following expression:


I also found “A better .NET Regular Expression Tester”.

Technorati Tags: ,