Python Regular Expression Extract String Using Sql To Build