Home > other >  How find Exact match and ignore second number in the text string on Google Sheet?
How find Exact match and ignore second number in the text string on Google Sheet?

Time:11-24

I have text in A2: A7. Using the REGEXMATCH function, I need to evaluate in column B2: B7 as TRUE only the text that contains age 0 age 1 age 2 However, this formula evaluates as TRUE as well age 10 age 11 age 12 How can this formula be defined? Thank you. enter image description here

CodePudding user response:

=ArrayFormula(REGEXMATCH(A2:A7&" ","age 2[^0-9]|age 0[^0-9]|age 1[^0-9]"))

&" " is to make sure there is something not numberish to match after the age

  • Related