add a shared global regular expression for GUID matching
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
gMacroDefPattern = re.compile("^(DEFINE|EDK_GLOBAL)[ \t]+")\r
gMacroNamePattern = re.compile("^{}$".format(_MacroNamePattern))\r
\r
gMacroDefPattern = re.compile("^(DEFINE|EDK_GLOBAL)[ \t]+")\r
gMacroNamePattern = re.compile("^{}$".format(_MacroNamePattern))\r
\r
+# definition for a GUID. used to create regular expressions below.\r
+_GuidPattern = r"[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}"\r
+\r
+## Regular expressions for GUID matching\r
+gGuidPattern = re.compile(r'{}'.format(_GuidPattern))\r
+gGuidPatternEnd = re.compile(r'{}$'.format(_GuidPattern))\r
+\r
#\r
# A global variable for whether current build in AutoGen phase or not.\r
#\r
#\r
# A global variable for whether current build in AutoGen phase or not.\r
#\r