PatternMatch
(Engine-Level Function)
String |
Required. The string you wish to compare to Pattern. |
Pattern |
Required. The reference pattern to which you wish String to be compared. |
CaseInsensitive |
An optional Boolean parameter that indicates whether PatternMatch should be case insensitive when it performs the matching. The default for this parameter is FALSE, indicating that PatternMatch should be case sensitive. |
Comments: | If any of the arguments to PatternMatch are Invalid, PatternMatch returns Invalid. |
Examples:
PatternMatch call | Result | Comments |
---|---|---|
PatternMatch("Pump_1", "Pump_*") | True | |
PatternMatch("Pump_123", "Pump_*") | True | |
PatternMatch("Pump_1", "Pump_?") | True | |
PatternMatch("Pump_123", "Pump_?") | False | Only matching if there is a single character after the underscore |
PatternMatch("abc", "a?c") | True | |
PatternMatch("abbc", "a?c") | False | |
PatternMatch("abbc", "a*c") | True | |
PatternMatch("a*c", "a\*c") | True | |
PatternMatch("abc", "a\*c") | False | Only matches a literal '*' character |