[英]Google BigQuery extract string from column with regexp_extract
I need to extract the app_id from the following string in the column below: 我需要从下面的列中的以下字符串中提取app_id:
&app_id=4.25.9&
so anything that starts with &app_id=
and ends with &
所以任何开头&app_id=
,结尾&
Any ideas on how to write this example? 关于如何编写此示例的任何想法? The number of characters and symbols may differ. 字符和符号的数量可能不同。
This should be sufficient: 这应该足够了:
REGEXP_EXTRACT(your_column, r'\&app_id=(.+?)\&')
The app id matching right now .+?
应用程式编号目前相符.+?
is a little broad and will match any character, you may want to restrict it further. 有点宽,可以匹配任何字符,您可能需要进一步限制它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.