[1/3] from: uvaghela::egain::com at: 5-Jun-2001 22:31
I am new to Rebol and I need help with parsing. I parse a web page down to a numeric value say 2.5. At times, this value is in italics and has a tag <i> therefore it appears as <i>2.5 How can I check for the existence and if present, remove the tag? Thanks UV This message is intended solely for the use of the individual or organisation to whom it is addressed. It may contain legally privileged or confidential information. If you have received this message in error, please notify the originator immediately. If you are not the intended recipient, you should not use, copy, alter, disclose or rely on the contents of this message. All information or opinions expressed in this message and/or any attachments are those of the author and are not necessarily those of eGain Communications Ltd. or its affiliates. eGain Communications Ltd. accepts no responsibility for loss or damage arising from its use, including damage from viruses or other harmful content.
[2/3] from: petr:krenzelok:trz:cz at: 6-Jun-2001 0:10
----- Original Message ----- From: "Umesh Vaghela" <[uvaghela--egain--com]> To: <[rebol-list--rebol--com]> Sent: Tuesday, June 05, 2001 11:31 PM Subject: [REBOL] stripping characters...
> I am new to Rebol and I need help with parsing. > I parse a web page down to a numeric value say 2.5. At times, this value
> in italics and has a tag <i> therefore it appears as <i>2.5 > How can I check for the existence and if present, remove the tag?
parse/all read http://your-url-here [ some [ ; to repeat parsing ... to <i> here: ; mark the current position (for i 1 3 1 [remove here]) ; execute rebol code ... :here ; return back into parse context marking from where should we start ... ] to end ] I just hope it will work, it is quite some time I used such "complicated" parse statements :-)) PS: and if you want to use just one line: write %my-site.html replace/all read http://my-site.html "<i>" "" REBOL rulezzz!!! Cheers, -pekr-
[3/3] from: uvaghela:egain at: 5-Jun-2001 23:49
Petr, Thanks for the response. I took the shotgun approach and stripped all <i>'s at the beginning. UV