简体   繁体   English

Bigquery Regexp_Extract 问题 - 从全名字段中仅提取名字(中间位置)

[英]Bigquery Regexp_Extract Question - Extracting Only the First Name (mid placement) from Full Name Field

I want to use the Regexp_Extract function to isolate the first name from this string.我想使用 Regexp_Extract 函数从这个字符串中分离出名字。

Full Name
Scott, John Smith
Jackson, Adrian Lee
Park, Julie Ann

Desired Output期望输出

John
Adrian
Julie

Thanks!谢谢!

You seem to want the first string after the comma.您似乎想要逗号后的第一个字符串。 That would be:那将是:

select regexp_extract(full_name, ', ([^ ]+)') as first_name

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM