For the latest version of JMP Help, visit JMP.com/help.


Scripting Guide > Types of Data > Pattern Matching > Patterns and Case Matching
Publication date: 06/21/2023

Patterns and Case Matching

Unlike regular expressions, pattern matching is case insensitive. To force case sensitivity, you can add the named argument MATCHCASE to either Pat Match() or Regex Match(). For example:

string = "abcABC";
 
result = Regex Match( string, Pat Regex( "[aBc]+" ) );
Show( string, result );

/ *returns string = "abcABC"

result = {"abcABC"}*/

result = Regex Match( string, Pat Regex( "[cba]+" ), NULL, MATCHCASE );
Show( string, result );

/* returns string = "abcABC"

result = {"abc"}*/

Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).