I originally answered this, but after a few rereads of your question I do believe I need some additional information on what you are trying to accomplish. Can you give a more detailed description of how you are trying to store/retrieve your keywords?
Haha! Thanks Kem!
Maybe I just go RegEx, just of plain laziness…!
My own experiment failed because “there is more than one item with this name and it’s not clear to which it refers”.
(That’s about the most annoying error message there is… )
[code]
DIM strKeywords as String
strKeywords = ReplaceAll(strVar, chr(34) + " ", chr(34))
DIM i as Integer
FOR i = 0 TO UBound( split(strKeywords, “,”) ,1)
IF inStr(strKeywords , “,”) > 0 THEN System.DebugLog strKeywords ’ ReplaceAll(strKeywords , “,” , “,” )
IF inStr(strKeywords , “,”) > 0 THEN ReplaceAll(strKeywords , “,” , “,” ) << ERROR ON THIS LINE
NEXT
DIM arrWords(-1) AS String
arrWords = split(strKeywords, “,”)
However, not quite as pleasant as I expect.
I should have posted this image yesterday… it is clear.
I shall try with the RegEx. If that still fails, then I either use the poor alternative or skip this feature or think of something else.
It’s not a vital part of the project, in the greater perspective. It can wait, so to speak!
dim arr() as string
dim i as integer
arr = split(strKeywords, ",")
for i = ubound(arr) downto 0
arr(i) = trim(arr(i))
if arr(i) = "" then arr.remove(i)
next
wordcount = ubound(arr)
Thank you for introducing me to DOWNTO and .remove(i) !!
These were all new to me!
While we’re at it, shuffle has a great potential…!
You have European working hours in that part of Portland!? :-)[/quote]
I fail to understand why the solution I posted shortly after your question did not even seem to merit a comment on your part, although it does provide a working solution…
I’m sure this code is great but for the different purpose!
I tried this code and in this situation it was not selective enough. (Text.Area3 // KeyDown)
If I posted the image earlier then the circumstance would be more obvious! Simply my fault. I asked the wrong question. Again…!