Python Regex Extract String Using Sql Subselect Example