Parsing problem

Notices and updates
Locked
hsmyers
Posts: 104
Joined: Wed Feb 20, 2008 4:06 pm
Location: Boise, ID, USA
Contact:

Parsing problem

Post 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...
"Censeo Toto nos in Kansa esse decisse."—D. Gale "ℑ♥λ"—Toto

newBert
Posts: 156
Joined: Fri Oct 28, 2005 5:33 pm
Location: France

Post 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
BertrandnewLISP v.10.7.6 64-bit on Linux (Linux Mint 20.1)

Locked