convert [*] to the n with tab
Marielle Lange
rp011s7075 at blueyonder.co.uk
Mon Aug 29 06:31:52 EDT 2005
Dear Bob,
This is a job for regular expressions:
put "[0][0][9]item1[0][0][0][6]item2[0]item3" into tstr
put replacetext(tstr, "(\[[0-9]\])+", tab)
get you: item1 item2 item3
[0-9] Means any number between 0-9
\[ and \[ Because [ and ] are characters used to define options
(as the above shows), you need to escape it
(something)+ One or more of the same thing.
If you can have any number of digits in between square brackets, then
use
[0-9]+
Best,
Marielle
More information about the use-livecode
mailing list