Python Extract Substring Using Regex In Sql