Renamed bash function and extending SQL regex