]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Add new RegExp for future use
authorCarsey, Jaben </o=Intel/ou=Americas01/cn=Workers/cn=Carsey, Jaben>
Wed, 28 Mar 2018 16:04:58 +0000 (00:04 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Thu, 29 Mar 2018 00:55:09 +0000 (08:55 +0800)
Add a precompiled RegExp for 4 hex chars.
v2: fixed incorrect numbers of {}

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>
BaseTools/Source/Python/Common/GlobalData.py

index 3933e86cb9f650e999b967943d43b67113a62e7d..f872066057b74ea1dcc096365891364282eb6af9 100644 (file)
@@ -59,6 +59,8 @@ _GuidPattern = r"{Hex}{{8}}-{Hex}{{4}}-{Hex}{{4}}-{Hex}{{4}}-{Hex}{{12}}".format
 gGuidPattern = re.compile(r'{}'.format(_GuidPattern))\r
 gGuidPatternEnd = re.compile(r'{}$'.format(_GuidPattern))\r
 \r
 gGuidPattern = re.compile(r'{}'.format(_GuidPattern))\r
 gGuidPatternEnd = re.compile(r'{}$'.format(_GuidPattern))\r
 \r
+g4HexChar = re.compile(r'{}{{4}}'.format(_HexChar))\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