question_string = .array~of("Hello my name is Tom","Hello","my","name","is","Tom") say "Wanna play a game? (y/n)" pull answer if answer = y then DO loc = RANDOM(2,question_string~size) Say "String is: " question_string[1] say "At which index beginns: " question_string[loc] pull index PatternClz=bsf.loadClass("java.util.regex.Pattern") pattern=PatternClz~compile(question_string[loc]) matcher=pattern~matcher(question_string[1]) found=.false do while matcher~find start_index = matcher~bsf.dispatch("start") /* dispatch explicitly to Java object */ found=.true end if index == start_index then do say "Correct" end else do say "Incorrect" end END else say "Okay...bye" parse pull o ::requires BSF.CLS -- loads Java support