setEnableSuffix

setEnableSuffix(enable: Boolean): JadeRegexPattern;

This fluent‑style method returns its own modified receiver, to allow call chaining. (By default, suffixes are not enabled.)

Call the setEnableSuffix method of the JadeRegexPattern class with the enable parameter set to true to set the option that causes the suffix property of produced JadeRegexMatch objects to be populated.

The following is an example of the setEnableSuffix method.

setEnableSuffixExample();
constants
    Text = "The quick brown fox jumped over the lazy dog";
vars
    pattern : JadeRegexPattern;
    match : JadeRegexMatch;
begin
    create pattern;
    pattern.setLiteral(true)
           .setEnableSuffix(true)
           .compile("fox"); 
    pattern.findFirst(Text, match);
    write match.suffix; // " jumped over the lazy dog"
    pattern.setEnableSuffix(false).findFirst(Text, match);
    write match.suffix; // null
epilog
    delete pattern;
    delete match;
end;

You can set the suffix of a Regex pattern before or after you call the compile method.

2020.0.01 and higher