首页  编辑  

检查是否为GUID

Tags: /C#/字符串处理/正则表达式/   Date Created:

string S = "efee67fb-631d-4cff-b94b-19d0a890b377" ;

Text = Regex . Match(S, @"^[a-f0-9]{8}(-[a-f0-9]{4}){3}-[a-f0-9]{12}$" ,

    RegexOptions . IgnoreCase

) . Success . ToString();