This one is ideal for my current project. In my eyes, it is very elegant.
>
> i=Instr(s,"<")
> while i> 0
> j=InStr(s,">", i)
> cut out from s the substring from i to j
> i=Instr(s,"<")
> wend
I made a function out of it and cut the strings with String.Left and
String.Mid, just
Why don't you run benchmarks to find out?
Dim ff As Float
Dim ii As Integer
ff = Timer
For ii = 1 To SomeNumber
FunctionToTest()
Next
Print "Time to run: " & CStr(Timer - ff)
Choose value for "SomeNumber" so that run time is significant enough to
give reasonably reliable measurement,
in o
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 f