This will strip "save named query" command in the beginning of the line: '\ns zzz SELECT * FROM abc' -> 'SELECT * FROM abc' ' \ns zzz SELECT * FROM abc' -> 'SELECT * FROM abc'
(txt)
| 164 | |
| 165 | |
| 166 | def _strip_named_query(txt): |
| 167 | """ |
| 168 | This will strip "save named query" command in the beginning of the line: |
| 169 | '\ns zzz SELECT * FROM abc' -> 'SELECT * FROM abc' |
| 170 | ' \ns zzz SELECT * FROM abc' -> 'SELECT * FROM abc' |
| 171 | """ |
| 172 | |
| 173 | if named_query_regex.match(txt): |
| 174 | txt = named_query_regex.sub('', txt) |
| 175 | return txt |
| 176 | |
| 177 | |
| 178 | function_body_pattern = re.compile(r'(\$.*?\$)([\s\S]*?)\1', re.M) |