从字符串中提取子字符串

Dan*_*lum 1 google-bigquery

在 google-bigquery 中,我需要拉取域 ** 和 ** 之间的字符串,如下例所示 该字符串位于“Site_Data”列下

有人能帮我吗?10 倍!

在此输入图像描述

Mik*_*ant 7

请参阅下面的示例

#standardSQL
WITH yourTable AS (
  SELECT '756-1__6565656565656, tagtype**unmapped,domain**www.sport.com,userarriveddirectly**False' AS Site_Data
)
SELECT 
  REGEXP_EXTRACT(Site_Data, r'domain\*\*(.*)\*\*') AS x,
  Site_Data
FROM yourTable
Run Code Online (Sandbox Code Playgroud)