REGEXMATCH

REGEXMATCH

Checks whether a piece of text matches a regular expression.

Syntax 

REGEXMATCH(text, regular_expression, [case_sensitivity])

text: The text to be tested against the regular expression.

regular_expression: The regular expression to test the text against.

case_sensitivityDetermines whether the match is case-sensitive. By default, the match is case-sensitive. Enter one of the following:
0: Case Sensitive
1: Case Insensitive

 Examples 


Formula

Result

=REGEXMATCH("Hello 123"; "[0-9]+")

True

=REGEXMATCH(A3; "[0-9]*\.[0-9]+[0-9]+")

True

=REGEXMATCH(A4; "\(([A-Za-z]+)\)")

True


Get a hands-on experience of the function in the embedded range below. 



Possible Errors 

Errors

Meaning

#N/A!

The specified delimiter was not found in the given text string.

The given instance value is higher than the total occurrences of the delimiter in the text string.

#NAME!

The function name is incorrect or invalid.

The given defined name (if any) is invalid.

There is a typo in the defined name used in the function.

Double quotes are missing for text values in the function.

Colon missing in a cell range reference.

#VALUE!

The given argument's data type is incorrect or invalid.

The given instance value is 0 or higher the length of the text string.

#REF!

The given cell reference is incorrect or invalid. This error may occur when a cell/range has been deleted, moved, or pasted over.

 

 Similar Functions