I'm looking to use REGEX_EXTRACT in Google BigQuery to extract 178GSKT19824 from the link below.
I tried a few variations of this: sample.com/.*/(.*).html.
but it still returns the entire url instead of the needed string.
CodePudding user response:
to use regex to capture everything between the first two '-' characters, you can use \-(.*?)\-
CodePudding user response:
If you want to capture all non /
characters before .html
use a lookahead:
[^\/]*(?=\.html)