Equinox Online Help - Language Reference - A to Z
Match |
|
---|---|
Applies to | |
Syntax | Match(TargetExpression, PatternExpression [, SearchExpression]) |
Action | [Function] Returns True if the arguments match. |
Scope | Usable anywhere. |
Notes | This function compares TargetExpression and PatternExpression. If they match, then True (a non-zero integer) is returned. The integer is actually the character position of the first matching character in PatternExpression. If they do not match, then False (zero) is returned. You can include the following special characters in PatternExpression:
The fifth argument, SearchExpression, can take one of the following values:
Exact case dictates the two strings must be the same case to match. Any case ignores the differences. By using the value 2 or 3 you can choose to ignore special characters in the TargetExpression. Sliding search means, for example, that searching for "asdf" in "this asdf string" returns true (This example uses value 6). If you omit the argument, then by default the value 0 is used. |
Category | String handling |
See Also | ChrList, Chrs, Compare, Fill, IsNumber, Left_Function, Len, Maxlen, Mid_Function, Remove, Replace, Right_Function], Search_SearchNext, SetLen, SetMaxLen, SortOrder, SubstituteData |
Example | The first example returns True for names like Smith, Smythe, Smithson, but False for smith, Smoothey, etc Match(lastname, "Sm?th*") The next example matches "Terminator", "The terminator", "Terminator Two", Exterminator", etc and ignores any special characters in the variable 'txt'. Match(txt, "*terminator*", 2) |