Page 1 of 1

Parsing problem

Posted: Wed Apr 09, 2008 3:55 pm
by hsmyers

Code: Select all

> 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...

Posted: Wed Apr 09, 2008 4:12 pm
by newBert
If you type:

Code: Select all

> (parse s "[\\]]"  0)
Note the position of 's' (before the regex)
You get:

Code: Select all

("[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:
UPDATE: uh--- Duh! How about wrong order of parameters in parse? Ignore this post please...
:D