regexgoogle-sheetsgoogle-sheets-formulatext-extraction

Google Sheets REGEXEXTRACT to extract text value for URL query-parameter


Given this value in A1:

https://www.rositarococo.com/?modeload=modeload-sigma-1&adsetname=cbo-LLA1apilados&adname=Default+name+-+Conversiones&placement=Facebook_Mobile_Feed

Example

For this URL I want to extract the text cbo-LLA1apilados ("adsetname" query-parameter's value)

&adsetname=cbo-LLA1apilados&adname

My lookbehind regex doesn't work in the formula.

Question

How to extract whats between "adsetname=" and "&adname" using REGEXEXTRACT?


Solution

  • try:

    =REGEXEXTRACT(A1, "adsetname=(.+)&adname")
    

    0