[REBOL] Parsing out strings
From: ml:sproingle at: 29-Apr-2004 17:55
I am pretty new to REBOL and am having a bit of trouble getting my head around how to
parse out strings from lines I am reading in from session logs.
I am looking at "clear find" and "remove/part" and things like this but I am getting
very confused as to what to use when, I am more of a left$, mid$, right$ kind of guy.
Perhaps I can illustrate.
Suppose the line I am parsing says:
the user jsmith logged in at 4.30pm
Can you give me a clue what I would use to parse in each of these circumstances where
the desired text is:
1. "the user"
2. "the user jsmith"
4. "jsmith logged in at 4.30pm"
5. "logged in at 4.30pm"
Obviously the jsmith part would change for each line so the parsing out would need to
probably base it on looking for "the user " and then looking for the next space after
that which should be after the name.
Anyone give me a clue?