[Top][All Lists]

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

Re: Question about string-match and match-string

From: Suvayu Ali
Subject: Re: Question about string-match and match-string
Date: Wed, 17 Jul 2013 12:02:47 +0200
User-agent: Mutt/1.5.21 (2012-12-30)

Hi Nicolas,

On Wed, Jul 17, 2013 at 10:53:14AM +0200, Nicolas Richard wrote:
> > PS: I'm also not very clear why we need 4 \-s in the regex to match a
> >     single \ in the string.  I came up with it by trial and error with the
> >     regexp-builder.  Any explanation about that would also be great.
> I hope the above is an explanation of that. Just remember there are two
> steps:
> (i) emacs reads the string
> (ii) the string is made into a regexp
> so for matching on \, you  need the regexp \\, which is obtained by the
> string "\\\\" (e.g. (insert "\\\\") inserts \\)

Thank you for the very clear explanation.  It was very helpful.  :)



Open source is the future. It sets us free.

reply via email to

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