@@ -19,10 +19,10 @@ composite RegexMatchNFSample {
1919 ()as Custom_1 = Custom(){
2020 logic
2121 onProcess : {
22- // Compile and index regex pattern, additionally increase max memory allocated
22+ // Compile and index regex pattern _1 for Custom_1 , additionally increase max memory allocated
2323 regexCompile("^Hello", RegexPattern._1);
2424 regexCompile("Hello world$", RegexPattern._2);
25- regexCompile(".*VERY_BIG_PATTERN.*", RegexPattern._3, 10000000 );
25+ regexCompile(".*VERY_BIG_PATTERN.*", RegexPattern._3, 10000000l );
2626
2727 // Simple partial match (similar to SPL regex functions) - regex pattern is interpreted on each call
2828 printString("regexPartialMatch: 'Hello world' matches '^Hello': ");
@@ -32,18 +32,44 @@ composite RegexMatchNFSample {
3232 printString("regexFullMatch: 'Hello world' matches '^Hello world': ");
3333 println(regexFullMatch("Hello world", "^Hello world"));
3434
35- // Fast partial match - compiled regex pattern 1 is used
35+ // Fast partial match - compiled regex pattern _1 is used
3636 printString("regexPartialMatch: 'Hello world' matches '^Hello': ");
3737 println(regexPartialMatch("Hello world", RegexPattern._1));
3838
39- // Fast full match - compiled regex pattern 1 is used
39+ // Fast full match - compiled regex pattern _1 is used
4040 printString("regexFullMatch: 'Hello world' matches '^Hello': ");
4141 println(regexFullMatch("Hello world", RegexPattern._1));
4242
43- // Fast full match - compiled regex pattern 2 is used
43+ // Fast full match - compiled regex pattern _2 is used
4444 printString("regexFullMatch: 'Hello world' matches 'Hello world$': ");
4545 println(regexFullMatch("Hello world", RegexPattern._2));
4646 }
4747
4848 }
49+
50+ ()as Custom_2 = Custom(){
51+ logic
52+ onProcess : {
53+ // Compile and index regex pattern _1 for Custom_2
54+ regexCompile("Hello$", RegexPattern._1);
55+
56+ // Fast partial match - compiled regex pattern _1 is used
57+ printString("regexPartialMatch 2: 'Hello world' matches 'Hello$': ");
58+ println(regexPartialMatchStatic("Hello world", RegexPattern._1));
59+ }
60+
61+ }
62+
63+ ()as Custom_3 = Custom(){
64+ logic
65+ onProcess : {
66+ // Compile and index regex pattern _1 for Custom_2
67+ regexCompile("Hello2$", RegexPattern._1);
68+
69+ // Fast partial match - compiled regex pattern _1 is used
70+ printString("regexPartialMatch 2: 'Hello world' matches 'Hello$': ");
71+ println(regexPartialMatchStatic("Hello world", RegexPattern._1));
72+ }
73+
74+ }
4975}
0 commit comments