def _strip_named_query(txt):
 if named_query_regex.match(txt):
  txt = named_query_regex.sub('', txt)
 return txt

def _strip_named_query ( txt ) : if named_query_regex . match ( txt ) : txt = named_query_regex . sub ( '' , txt ) return txt
this will strip "save named query" command in the beginning of the line: s zzz select * from abc -> select * from abc s zzz select * from abc -> select * from abc .