[REBOL] Re: 'Parse is peculiar! - more details

2000-12-14 Thread Shannon Baker
Thanks Peter and Andrew, you both know your 'parse. Unfortunately your answers didn't help me with the first issue. Perhaps I need to explain the problem more clearly. I have a large collection of log files generated by a Counter-Strike games server. When a user connects a line is generated that

[REBOL] Re: 'Parse is peculiar! - more details

2000-12-14 Thread Daan Oosterveld
Because the game doesn't check the characters being inserted in the name the grammar of the logfile is not correct and not parseable thru a left to right parser. (not with this 'parse function). This works fine if the plater does not have a name with the string {"} r-tag: [ "" thru "" ] parse

[REBOL] Re: 'Parse is peculiar! - more details

2000-12-14 Thread Ingo Hohmann
Hi Brett, here's my take, assuming that "WON:" is sure not to be in the name-string (and it is the only thing you can be sure about ... line1: {Lets find "Julie1234WON:90966776"} main-rule: [ (next-part: "") thru {"} copy name to {} some sub-rule to end ] sub-rule: [ "WON:" (print name) to end

[REBOL] Re: 'Parse is peculiar! - more details

2000-12-14 Thread Anton
Shannon, If name has a value before the parse, then there is no error and it returns true. Can you check from a fresh start? digits: charset "0123456789" line1: {Lets find "Julie1234"} parse line1 [thru {"} copy name [thru {} 4 digits {} (print name)] to end] Anton. - parse line1 [thru {"}

[REBOL] Re: 'Parse is peculiar! - more details

2000-12-14 Thread Allen Kamp
Why not read/lines and then use entry: parse line {"} == ["L" "09/22/2000" "-" "15:49:22:" "Usyd H4XX0R124WON:20007739" "connected," "ip" "160.34.64.112"] This will give you a consistent 8 part format. Can then use entry/1 entry/2 etc for simple access to the results. Cheers, Allen K --

[REBOL] Re: 'Parse is peculiar! - more details

2000-12-14 Thread Brett Handley
me) to end | ( if next-part "" [if not name [name: copy ""] append name join "" next-part] ) skip copy next-part to "" ] Brett - Original Message - From: "Ingo Hohmann" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thur

[REBOL] Re: 'Parse is peculiar! - more details

2000-12-14 Thread Ingo Hohmann
Hi Brett, found an error in my last post, it didn't work for "" line1: {Lets find "Julie1234WON:90966776"} main-rule: [ (next-part: "") thru {"} copy name to {} some sub-rule to end ] sub-rule: [ "WON:" (print name) to end | (if next-part "" [if none? next-part [next-part: ""]