Search code examples
regexif-statementgoogle-sheetsgoogle-sheets-formulaarray-formulas

Find words in a cell and return a true or false using regexract


I'm trying to find words in a cell using regextract but it is not bringing back all words in the cell.

It will bring back:

gamer

but not

_gamer

or

@gamer

But I need all of them. Here is the sheet I am using.

I'm trying to find words in a cell using regextract but it is not bringing back all words in the cell:

=REGEXEXTRACT(C3,"gamer|gaming|game")

true


Solution

  • =ARRAYFORMULA(IF(LEN(A1:A), 
     IFERROR(REGEXMATCH(A1:A, ".*game.*|game|.*gaming.*|gaming")), ))
    

    0


    =ARRAYFORMULA(IFERROR(REGEXEXTRACT(A1:A, ".*game.*|game|.*gaming.*|gaming")))
    

    0