01-04-2016, 08:02 PM
Dear Gintaras, many thanks indeed. Let me attach my approach. It is implied that yours is elegant and powerful. Best regards.
Function tempf12
Function tempf12
str subject="`164```````````````123```"
str pattern="`"
ARRAY(str) arr
int i i0 i1 nt
ARRAY(CHARRANGE) a
nt=findrx(subject pattern 0 4 a)
;s.get(subject 29 43-29)
;out s
out nt
if nt=0; ret
arr.create(nt+1)
;1st Element
i0=a[0 0].cpMax
arr[0].get(subject 0 i0-1)
;Subsequent Elements
for i 0 a.len-1
,i0=a[0 i].cpMax
,i1=a[0 i+1].cpMin
,arr[i+1].get(subject i0 i1-i0)
;,out F"{i} {i0} {i1} {s}"
for i 0 arr.len
,out F"{i} {arr[i]}"