[REBOL] Re: using 'find to search
From: ryan::christiansen::intellisol::com at: 11-Apr-2001 16:57
The foreach statement doesn't seem to be checking "each" 'xml-message in
'messages. It only seems to be searching on the second message. It will
find any word in the second message, but ignores the first message
altogether.
Ryan C. Christiansen
Web Developer
Intellisol International
4733 Amber Valley Parkway
Fargo, ND 58104
701-235-3390 ext. 6671
FAX: 701-235-9940
http://www.intellisol.com
Global Leader in People Performance Software
_____________________________________
Confidentiality Notice
This message may contain privileged and confidential information. If you
think, for any reason, that this message may have been addressed to you in
error, you must not disseminate, copy or take any action in reliance on it,
and we would ask you to notify us immediately by return email to
[ryan--christiansen--intellisol--com]
[ryan--christiansen--inte]
llisol.com To: [rebol-list--rebol--com]
Sent by: cc:
[rebol-bounce--rebol--com] Subject: [REBOL] using 'find to search
04/11/2001 04:40 PM
Please respond to
rebol-list
I am using the following to search for keywords in a string.
The word 'xml-message represents a string which includes XML tags and
content between the tags.
The word 'messages is a block of 'xml-message strings.
The word 'cgi-data is an object including values 'keyword and 'messageID
foreach xml-message messages [
if find xml-message cgi-data/keyword [
message-with-keyword: load/markup xml-message
append messages-with-keyword message-with-keyword/<messageID>
messages-with-keyword
]
]
You can see the search function in action here:
http://www.fargonews.com/rebolrepublic
The 'find seems to be able to find some of the words in the string, but not
others. It will successfully find "as" and "rebol" but cannot find
professional
or "such."
I'm confused.
Ryan C. Christiansen
Web Developer
Intellisol International
4733 Amber Valley Parkway
Fargo, ND 58104
701-235-3390 ext. 6671
FAX: 701-235-9940
http://www.intellisol.com
Global Leader in People Performance Software
_____________________________________
Confidentiality Notice
This message may contain privileged and confidential information. If you
think, for any reason, that this message may have been addressed to you in
error, you must not disseminate, copy or take any action in reliance on it,
and we would ask you to notify us immediately by return email to
[ryan--christiansen--intellisol--com]