diff options
author | Carsey, Jaben </o=Intel/ou=Americas01/cn=Workers/cn=Carsey, Jaben> | 2018-03-17 07:27:45 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-03-29 10:17:46 +0800 |
commit | 0760ed06a139aa6f84568147e3ee4fe919469238 (patch) | |
tree | 442e78c84d3290aa414835410f7d961e74fd3b85 /BaseTools | |
parent | 9e7790a352ee4cbe4b8d2a051345c750c086c9a6 (diff) | |
download | edk2-0760ed06a139aa6f84568147e3ee4fe919469238.tar.gz edk2-0760ed06a139aa6f84568147e3ee4fe919469238.tar.bz2 edk2-0760ed06a139aa6f84568147e3ee4fe919469238.zip |
BaseTools: GlobalData Add a regular expression for a hex number
add a shared precompiled regular expression
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>
Diffstat (limited to 'BaseTools')
-rw-r--r-- | BaseTools/Source/Python/Common/GlobalData.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/BaseTools/Source/Python/Common/GlobalData.py b/BaseTools/Source/Python/Common/GlobalData.py index f872066057..fab67601a9 100644 --- a/BaseTools/Source/Python/Common/GlobalData.py +++ b/BaseTools/Source/Python/Common/GlobalData.py @@ -59,7 +59,9 @@ _GuidPattern = r"{Hex}{{8}}-{Hex}{{4}}-{Hex}{{4}}-{Hex}{{4}}-{Hex}{{12}}".format gGuidPattern = re.compile(r'{}'.format(_GuidPattern))
gGuidPatternEnd = re.compile(r'{}$'.format(_GuidPattern))
+## Regular expressions for HEX matching
g4HexChar = re.compile(r'{}{{4}}'.format(_HexChar))
+gHexPattern = re.compile(r'0[xX]{}+'.format(_HexChar))
#
# A global variable for whether current build in AutoGen phase or not.
|