Created
April 25, 2017 08:04
-
-
Save frankyaorenjie/955e123c9d3058570b437134423751e9 to your computer and use it in GitHub Desktop.
bigquery regex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH params AS | |
(SELECT "[vtt_source=visenze_admin&error_page=5&error_limit=100]" as param | |
UNION ALL | |
SELECT "[__vs_inner=true&vtt_source=visenze_admin]" as param | |
UNION ALL | |
SELECT "[a=1]" as param) | |
SELECT | |
REGEXP_EXTRACT(param, r"vtt_source=(\w+)") | |
AS vtt_source | |
FROM params; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment