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 to only 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 PERL-syntax.
  2. If the pattern input is omitted or missing, NxMatch return a #VALUE! error.
  3. In the event the input pattern includes Caret ("^") and dollar -sign ("$"), the partial flag is ignored.

 

Examples

Example 1:

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

 

Files Examples

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