unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* About regexp
@ 2012-11-25  8:50 xfq
  2012-11-25 15:41 ` Drew Adams
  0 siblings, 1 reply; 3+ messages in thread
From: xfq @ 2012-11-25  8:50 UTC (permalink / raw)
  To: help-gnu-emacs

I have a questions about regexp.

The default value of the variable `sentence-end-base' is:
[.?!][]\"'”)}]*
There is a backslash in the second part of the regexp, why?



^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: About regexp
  2012-11-25  8:50 About regexp xfq
@ 2012-11-25 15:41 ` Drew Adams
  2012-11-26  7:50   ` xfq
  0 siblings, 1 reply; 3+ messages in thread
From: Drew Adams @ 2012-11-25 15:41 UTC (permalink / raw)
  To: 'xfq', help-gnu-emacs

> The default value of the variable `sentence-end-base' is:
> [.?!][]\"'")}]*
> There is a backslash in the second part of the regexp, why?

C-h v sentence-end-base tells you:

 sentence-end-base is a variable defined in `paragraphs.el'.
 Its value is "[.?!][]\"'")}]*" 

IOW, the value is a string.  The double-quote chars shown surrounding the string
are not characters in the string.  The double-quote char shown just before the
single-quote char, ', is in the string.  When printed, that char is escaped with
a backslash.  The char in the string following the ' char is a different char (a
curly quote) - it is not used to indicate the string limits, so it need not be
escaped to distinguish it.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: About regexp
  2012-11-25 15:41 ` Drew Adams
@ 2012-11-26  7:50   ` xfq
  0 siblings, 0 replies; 3+ messages in thread
From: xfq @ 2012-11-26  7:50 UTC (permalink / raw)
  To: Drew Adams; +Cc: help-gnu-emacs

On 11/25/2012 11:41 PM, Drew Adams wrote:
>> The default value of the variable `sentence-end-base' is:
>> [.?!][]\"'")}]*
>> There is a backslash in the second part of the regexp, why?
>
> C-h v sentence-end-base tells you:
>
>   sentence-end-base is a variable defined in `paragraphs.el'.
>   Its value is "[.?!][]\"'")}]*"
>
> IOW, the value is a string.  The double-quote chars shown surrounding the string
> are not characters in the string.  The double-quote char shown just before the
> single-quote char, ', is in the string.  When printed, that char is escaped with
> a backslash.  The char in the string following the ' char is a different char (a
> curly quote) - it is not used to indicate the string limits, so it need not be
> escaped to distinguish it.
>
Thx.  BTW, I like your bookark+/ediff+/Icicles/lacarte very much.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-11-26  7:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-25  8:50 About regexp xfq
2012-11-25 15:41 ` Drew Adams
2012-11-26  7:50   ` xfq

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).