FINDRX type can be used with findrx instead of from. Definition:
type FINDRX ifrom ito fcallout paramc
ifrom - start from here. 0-based character index in s (subject string). Default: 0.
ito - do until here. Default: s length.
fcallout - callout callback function.
paramc - some value or pointer to be accessed by callout callback function.
Before passing the variable to the function, you can set one or more members that you use, leaving other members uninitialized, that is 0.
If fcallout is 0, findrx behavior is same as usually (when using from), plus you can set string portion (ifrom to ito) where to search.
str subj="One two three" str pattern="[a-z]+(?C)o" FINDRX r r.fcallout=&callout int i=findrx(subj pattern &r) Callback function / function[c]# CALLOUT*p out p.start_match