Subject: Re: Why is "]" == "\]"?

From: Johann Petrak <[email-masked]>
Date: Thu, 9 Mar 1995 16:13:34 +0100

> "]" == "\]"
> 
> All tests said, that these two strings are equal. But how could I
> parse strings where "]" is command character or so but "\]" is legal
> syntax for using "]" as a normal character?
Since \ is an escape character in LISP you have to double it to 
get a string that actually contains the backslash. (see Steele CLtL2, p34)
(Undefined escape sequences may just ignore the backslash, thus "\["
is identical to "[").
So just double your backslash: "\\["

Johann Petrak                            Email: [email-masked]
Austrian Research Institute for          Phone:        +43-1-533-61-12
Artificial Intelligence                                +43-1-535-32-81/0
Schottengasse 3                          Fax:          +43-1-532-06-52
A-1010 Vienna, AUSTRIA                   Private Phone:+43-1-24-03-173
					 http://www.ai.univie.ac.at

---

From: Oliver Andrich <[email-masked]>
Date: Fri, 10 Mar 95 12:12:19 MET

> (Undefined escape sequences may just ignore the backslash, thus "\["
Ok, I know that too, after reading the Steele, but ....

> So just double your backslash: "\\["

I don't want to preparse my input data with perl or so, but I want to
do the whole job with LISP. And in my input data there are only "\["
and no "\\[". Is there no way to disable the escape sequencing for a
while in order to do the job in LISP?

Bye Oliver