RPTools

Personal tools
From MapToolDoc

matches

matches() Function

Introduced in version 1.3b48

Returns 1 if a string matches pattern or 0 if it does not. The pattern can be a regular expression. Matches performs a while string comparison, so the pattern must match the whole of the input string and not only part of it.

Usage

  1. matches(str, pattern)

Examples

  1.     [r: matches("This is a test", "test")]
  2.     [r: matches("test", "test")]
  3.     [r: matches("This is a test", ".*test")]

Returns

   0
   1
   1