# Names must be letters, numbers, -, and _. They must start with letter,
# except for downstream extensions which must start with __RFQDN_.
# Dots are only valid in the downstream extension prefix.
-valid_name = re.compile('^(__[a-zA-Z0-9.-]+_)?'
+valid_name = re.compile(r'^(__[a-zA-Z0-9.-]+_)?'
'[a-zA-Z][a-zA-Z0-9_-]*$')
if indent_level:
indent = genindent(indent_level)
# re.subn() lacks flags support before Python 2.7, use re.compile()
- raw = re.subn(re.compile("^.", re.MULTILINE),
+ raw = re.subn(re.compile(r'^.', re.MULTILINE),
indent + r'\g<0>', raw)
raw = raw[0]
- return re.sub(re.escape(eatspace) + ' *', '', raw)
+ return re.sub(re.escape(eatspace) + r' *', '', raw)
def mcgen(code, **kwds):
for oa in opts:
o, a = oa
if o in ("-p", "--prefix"):
- match = re.match('([A-Za-z_.-][A-Za-z0-9_.-]*)?', a)
+ match = re.match(r'([A-Za-z_.-][A-Za-z0-9_.-]*)?', a)
if match.end() != len(a):
print >>sys.stderr, \
"%s: 'funny character '%s' in argument of --prefix" \