init
This commit is contained in:
11
tools/rehelper.py
Normal file
11
tools/rehelper.py
Normal file
@@ -0,0 +1,11 @@
|
||||
def identifier():
|
||||
return "[a-zA-Z_][0-9a-zA-Z_]*"
|
||||
|
||||
def wholeWord(x):
|
||||
return "\\b%s\\b"%x
|
||||
|
||||
def group(x, name=None):
|
||||
if name:
|
||||
return "(?P<%s>%s)"%(name, x)
|
||||
else:
|
||||
return "(%s)"%x
|
||||
Reference in New Issue
Block a user