convert [*] to the n with tab

rev at armbase.com rev at armbase.com
Mon Aug 29 04:19:26 EDT 2005


Hi All.

I have a field with text items separated with charachters bounded by multiples
of [*].

eg
[0][0][9]item1[0][0][0][6]item2[0]item3

I would like the separator items [*] or [*][*] or [*][*][*] etc to be replaced
with a single tab.
I thought of this script

on mouseUp
  put "preparsed" into p -- insert your field name here
  put empty into v
  repeat with x = 1 to the number of lines of fld p
  --put empty into v
  get line x of fld p
replace [*] with \
end repeat
end mouseUp

However I keep getting the error

compiling at 9:18:04 AM
Type	Expression: bad factor
Object	convert [*]n to tab delimiter
Line	replace [*] with \
Hint	[

Any ideas. Is it the case that I cant use [ as a charachter? It was inserted OK.

All the best
Bob




More information about the use-livecode mailing list