首页 > 解决方案 > Obtain everything from string after last underscore in every string

问题描述

I am trying to extract everything from my list of strings after the last underscore, after MOB_ in big query.

See example below:

STRING:

Topshop_AW19_Pro_MOB_competitors(mid price point)custom_affinity

DESIRED OUTPUT:

competitors(mid price point)custom_affinity

标签: sqlregexgoogle-bigquery

解决方案


这似乎直截了当:

RIGHT(stuff, RIGHT_FIND(stuff, 'MOB_'))

有趣的文档似乎有一些错误:

https://cloud.google.com/dataprep/docs/html/RIGHT-Function_57344732

https://cloud.google.com/dataprep/docs/html/RIGHTFIND-Function_118228807


推荐阅读