newLISP Fan Club

Forum => newLISP newS => Topic started by: hsmyers on April 09, 2008, 08:55:58 AM

Title: Parsing problem
Post by: hsmyers on April 09, 2008, 08:55:58 AM
> s
"[Event this is the first event [Event this is the second event [Event and this is the third"

> (regex "[\[]" s 0)
("[" 0 1)
> (parse "[\]]" s 0)

regular expression in function parse : "offset 91 missing terminating ] for character class"

If regex is happy, what is parse's problem? Please enlighten me.



--hsm



UPDATE: uh--- Duh! How about wrong order of parameters in parse? Ignore this post please...
Title:
Post by: newBert on April 09, 2008, 09:12:06 AM
If you type:
> (parse s "[\]]"  0)
Note the position of 's' (before the regex)

You get:
("[Event this is the first event [Event this is the second event [Event and this is the third")
Is this what you expect ?



Sorry, I didn't see:
QuoteUPDATE: uh--- Duh! How about wrong order of parameters in parse? Ignore this post please...


:D