itemDel

Jan Schenkel janschenkel at yahoo.com
Wed Jul 31 06:24:01 EDT 2002


Hi Yves,

There are two problems here:
- the itemDelimiter property wants a single char
- the separator "*$*" consists of characters which are
themselves used for the decomposition of regular
expression, so that makes it hard to use matchChunk

Hence a little workaround, assuming the string does
not contain multiple lines:

function myItemExtractor pString, pDelimiter, pitemNum
  put pString into tString
  replace pDelimiter with return in tString
  split tString by return
  return tString[pItemNum]
end myItemExtractor

Perhaps not the most elegant solution, but it should
work,

Jan Schenkel.

"As we grow older, we grow both wiser and more foolish
at the same time."  (De Rochefoucald)

--- Yves Coppé <yvescoppe at skynet.be> wrote:
> Hi,
> 
> is it possible to write a function which should
> extract an item of a 
> list BUT the itemDel should be, NOT one Char, but a
> charset of 3 
> chars !
> 
> my list :
> 
> one*$*Two*$*Three*$Four
> 
> I'd like to get item 3 with is "Three"
> In this case the itemdel is "*$*"
> 
> thank you
> -- 
> Greetings.
> 
> Yves COPPE
> 
> Email : yvescoppe at skynet.be
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
>
http://lists.runrev.com/mailman/listinfo/use-revolution


__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com



More information about the use-livecode mailing list