fork download
  1. import re
  2. query = "SELECT `asd`.`ssss` as `column1`, `ss`.`wwwwwww` from `table`"
  3. table_and_columns = re.findall('`[^`\s]+`\.`[^`\s]+`',query)
  4. print(table_and_columns)
Success #stdin #stdout 0.03s 9384KB
stdin
Standard input is empty
stdout
['`asd`.`ssss`', '`ss`.`wwwwwww`']