Search code examples
stringgoogle-sheetsextract

Extract text in Google Sheets in a []


I'm trying to extract some text in a [] the data looks like this: enter image description here

Basically I need the middle information, what I've tried was using split but I don't need more columns and also tried to use =REGEXEXTRACT() but did't work well some formulas suggestion please!


Solution

  • regex \[(.+?)\] will capture text between [ and ]

    =REGEXEXTRACT(A2; "\[(.+?)\]")