[Gambas-user] What's faster: RegExp or String function
Phạm Quang Dương
soleilpqd at ...626...
Wed Nov 30 16:27:40 CET 2011
Hi all,
I want to remove all substring marked with '<>'. I have 2 functions:
Dim rEx As New Regexp
rEx.Compile("<.*>")
rEx.Exec(s)
While rEx.Offset >= 0
s = Replace(s, rEx.Text, "")
rEx.Exec(s)
Wend
And
i=Instr(s,"<")
while i > 0
j=InStr(s,">", i)
cut out from s the substring from i to j
i=Instr(s,"<")
wend
Which one should I choose?
Thank you :)
More information about the User
mailing list