Google-sheets – Regex compare two strings

google sheetsregexworksheet-function

I have two strings

"*j?a?c?k*c?o?o?p?e?r*a?v?o?n*l?a?k?e*o?h*"

and

"*j?a?c?k*c?o?o?p?e?r*t?r?a?n?s?p?o?r?t*a?v?o?n*l?a?k?e*t?e?r?m?i?n?a?l*"

These seem like they should be equal in regex. However, I cannot find a function in Google sheets (vlookup, search, …) that provides this answer because neither is a substring of the other.

Is there anyway to equate them?

Best Answer

Use REGEXMATCH

Whether a piece of text matches a regular expression.

Sample Usage
REGEXMATCH("Spreadsheets", "S.r")

Syntax

REGEXMATCH(text, regular_expression)
  • text - The text to be tested against the regular expression.
  • regular_expression - The regular expression to test the text against.