> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Friday, October 08, 1999 8:47 PM
> To: [EMAIL PROTECTED]
> Subject: [REBOL] How to get rid of Selma numbering? Re:
> Try the function re-post.
Hi Jeff, thanks for the hint. Here is the code:
Repost: func [message /local here there re-cnt] [
re-cnt: 0
parse message/subject [
some [to "re:" here: (remove/part here 3 re-cnt: re-cnt + 1)
["[REBOL]" 0 10 " " there: (remove/part here there) :here |
"(" copy num digits ")" there:
(re-cnt: re-cnt - 1 + (to-integer trim/tail num) remove/part
here there) :here | none]
]
]
insert tail trim message/subject " Re:"
if re-cnt > 1 [
insert tail message/subject reduce ["(" re-cnt ")"]
]
post message
]
As it's not so easy to test the mailing list processor in house,
I want to check back that I understand it correctly before I make
some changes.
1. 'here' gets assigned the position in the subject line where
"re:" was found and has been removed.
2. re-cnt is incremented in the case that "re:" was found/parsed.
3. Than "[REBOL]" is searched and the next 0 to 10(?) spaces are
skipped.
4. Than the tracking-number is parsed and copied to 'num'.
5. Than re-cnt is updated to the next message tracking number and
some stuff is removed (I think it's the old tracking number)
6. Now " Re:" is inserted at the end of the message-subject and
the current tracking number is inserted, right?
If this is all right, than removing the code snippet:
insert tail trim message/subject " Re:"
if re-cnt > 1 [
insert tail message/subject reduce ["(" re-cnt ")"]
]
Should avoid adding the numbers, right?
Robert M. Muench, Karlsruhe, Germany
==> ask for PGP public-key <==
When do you want to reboot today?
Use the free portable GUI Library
OpenAmulet from http://www.openip.org