compile

compile(pattern: String);

The compile method of the JadeRegexPattern class compiles the string specified in the pattern parameter, as shown in the following example.

compileExample();
constants
    Text = "the quick brown fox jumped over the lazy dog";
    // match 9 words with optional space on the end in non‑capturing group
    PatternStr = "(?>\w+\s?){9}";
vars
    pattern : JadeRegexPattern;
begin
    create pattern;
    pattern.setAnchored(true)
           .compile(PatternStr);
    write pattern.isMatch(Text); // true
end;

If you want to tailor the interpretation of the pattern, the following JadeRegexPattern fluent methods should be called before the compile method in order to be compiled with the pattern.

2020.0.01 and higher