[Gambas-user] What's faster: RegExp or String function

Rolf-Werner Eilert eilert-sprachen at ...221...
Thu Dec 1 10:34:20 CET 2011


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 one line.

Thanks for that idea! The regexp, however, didn't run (I guess I'd have 
to define some more things), but in my program it is needed only once 
when the user types a "(", so speed doesn't matter.

Regards

Rolf





More information about the User mailing list