help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: I can not understant a paragraph in Emacs Lisp Reference.


From: Anselm Helbig
Subject: Re: I can not understant a paragraph in Emacs Lisp Reference.
Date: Sat, 11 Jul 2009 14:27:24 +0200

Hi!

> As a `\' is not special inside a character alternative, it can never
> remove the special meaning of `-' or `]'.  So you should not quote
> these characters when they have no special meaning either.  This would
> not clarify anything, since backslashes can legitimately precede these
> characters where they _have_ special meaning, as in `[^\]' (`"[^\\]"'
> for Lisp string syntax), which matches any single character except a
> backslash.
> 
> `[^\]'  or `"[^\\]"' , which is right ? what is Lisp string syntax for ?

Seems to be clear to me: the first one is correct, but the second one
also works, you're just specifying the same character twice, like in
`[^aa]'. So the elisp string would be "[^\\]". Do you know about 
M-x re-builder?

Happy hacking!

Anselm


-- 
Anselm Helbig 
mailto:anselm.helbig+news2009@googlemail.com


reply via email to

[Prev in Thread] Current Thread [Next in Thread]