isMatch

isMatch(textToSearch: String): Boolean;

The isMatch method of the JadeRegexPattern class determines if the specified text completely matches the pattern. This method returns true if the whole of the specified text string matches the pattern; otherwise it returns false.

For a match to occur, the pattern must match the entire specified text.

The following is an example of the isMatch operation with a customized pattern.

isMatchExample();
vars
    compiledPattern : JadeRegexPattern;
begin
    create compiledPattern;
    compiledPattern.compile("\\\\(\w+\\){1,}"); // find network share folder
    write compiledPattern.isMatch("\\colleaguesPc\share\"); // true
    write compiledPattern.isMatch("c:\users\me\share\"); // false
    write compiledPattern.isMatch("\\colleaguesPc\share\someFile"); // false
epilog
    delete compiledPattern;
end;

2020.0.01 and higher