Skip to content
Advertisement

BigQuery/SQL: Split String based on the second dot from right

update: there are situations that dot position that might not be the best solution.

I got a column of website.

I want to transform it into

Anyone knows how to split based on the ‘.’ position from the right?

Thanks.

Advertisement

Answer

regexp_substr() does exactly what you want:

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement