This example returns resultArray
= {X1, X2}.
set s1 = "The findPatterns() operation finds the X1 and X2 in this phrase."
set resultArray = s1.findPatterns("X.");
This example throws an error as there is no X in the string at all.
set s1 = "The findPatterns() operation won't find the pattern."
set resultArray = s1.findPattern("X.");