NxMatch - Regular Expression (regex) Match Function

Returns TRUE if the string matches the regular expression expressed.

Syntax

NxMatch(string, Pattern, partial, Ignore_case)

string
is the input string to match for.
Pattern
is the regular expression (regex PERL-style) to match the input string with (e.g., ^Thi[sS].*$).
partial
is a flag/switch to indicate whether a substring or a partial match (search) is permitted or only to consider full-string match. If missing or omitted, partial is set to TRUE.
Ignore_case
is a flag to instruct the function to ignore the letter-case in the string. If missing, ignore_case is set to TRUE.

Remarks

  1. Currently, NxMatch supports regular expressions using the PERL-syntax.
  2. If the Pattern input is omitted or missing, NxMatch returns a #VALUE! error.
  3. In the event that the input pattern includes Caret ("^") and dollar sign ("$"), the partial flag is ignored.

Examples

Formula Description (Result)
=NxMatch("test this string","foo") FALSE
=NxMatch("test this string","test") TRUE
=NxMatch("test this string","Test",,FALSE) FALSE

Files Examples

Related Links

References

  • Jeffrey E.F. Friedl (2006). Mastering Regular Expressions (3rd edition). Oreilly Media. ISBN 0-596-52812-4.

Comments

Article is closed for comments.

Was this article helpful?
0 out of 0 found this helpful