I am in need to write a macro to find qm-items using regexp, something analogous to using QM-editor find function. If I understand well, qmitem does not work with regexp. I wonder whether there exists another way to overcome it. I attach my workaround.
Function tempf12
Many thanks in advance for any advice.
Function tempf12
str sl
QMITEM q; int i
rep
,i=qmitem(-i 1 &q 1)
,if(i=0) break
;,out "%-30s %-30s %s" q.name
,sl.formata("%s[]" q.name)
str pattern="\Qtemp\E\d\d"
ARRAY(str) a
if(findrx(sl pattern 0 4 a)<0) out "does not match"; ret
for i 0 a.len
,out a[0 i]
Many thanks in advance for any advice.