def str_regexes():
 regex_template = Template((((('matchgroup=Normal ' + 'start=+[uU]\\=${raw}${sep}+ ') + 'end=+${sep}+ ') + '${skip} ') + '${contains}'))
 skip_regex = Template('skip=+\\\\\\\\\\|\\\\${sep}+')
 for raw in ('', '[rR]'):
  for separator in ("'", '"', '"""', "'''"):
   if (len(separator) == 1):
    skip = skip_regex.substitute(sep=separator)
   else:
    skip = ''
   contains = ('contains=pythonEscape' if (not raw) else '')
   (yield regex_template.substitute(raw=raw, sep=separator, skip=skip, contains=contains))

def str_regexes ( ) : regex_template = Template ( ( ( ( ( 'matchgroup=Normal ' + 'start=+[uU]\\=${raw}${sep}+ ' ) + 'end=+${sep}+ ' ) + '${skip} ' ) + '${contains}' ) ) skip_regex = Template ( 'skip=+\\\\\\\\\\|\\\\${sep}+' ) for raw in ( '' , '[rR]' ) : for separator in ( "'" , '"' , '"""' , "'''" ) : if ( len ( separator ) == 1 ) : skip = skip_regex . substitute ( sep = separator ) else : skip = '' contains = ( 'contains=pythonEscape' if ( not raw ) else '' ) ( yield regex_template . substitute ( raw = raw , sep = separator , skip = skip , contains = contains ) )
generator to yield various combinations of strings regexes .