Posts: 1,058
Threads: 367
Joined: Oct 2007
In the following string named subject, I need to establish a pattern to match %IconFol%\......ico substrings. I am sorry if the solution is somewhere in the forum, I tried unsuccessfully. Any help is welcome.
Function
tempf10
str subject="Abcd12 %IconFol%\lykaio.ico Tree Tamtiriri %IconFol%\tree.ico Tzuni %IconFol%\tree.ico"
str pattern="%IconFol%\\*"
ARRAY(str) a
if(findrx(subject pattern 0 1|4 a)<0) out "does not match"; ret
int i; int n=a.len
out n
for i 0 n
,out a[0 i]
Posts: 1,058
Threads: 367
Joined: Oct 2007
This is a solution I found. At present it works :
Function
tempf11
ARRAY(str) a
if(findrx(subject pattern 0 1|4 a)<0) out "does not match"; ret
int i; int n=a.len
for i 0 n
,out a[0 i]
Posts: 133
Threads: 15
Joined: Jun 2014
You could try this, too:
Macro
Macro12
str subject="Abcd12 %IconFol%\lykaio.ico Tree Tamtiriri %IconFol%\tree.ico Tzuni %IconFol%\tree.ico"
str pattern="%i(.){8}"
ARRAY(str) a
if(findrx(subject pattern 0 1|4 a)<0) out "does not match"; ret
int i; int n=a.len
for i 0 n
,out a[0 i]
Posts: 1,058
Threads: 367
Joined: Oct 2007
Many thanks indeed. Best regards.