Search code examples
arraysregexgoogle-sheetsgoogle-sheets-formulare2

Extract complete string containing 'xxx' between two spaces


I want to know if there is a formula to extract a complete string containing 'xxx' between two spaces.

For example: example sheet


Solution

  • use:

    =ARRAYFORMULA(IFNA(REGEXEXTRACT(A1:A; "\[\S*xxx\S*\]")))
    

    enter image description here