unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* What's the deal with character classes in regexps?
@ 2007-08-11  8:56 David Kastrup
  2007-08-11  9:27 ` Sven Joachim
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: David Kastrup @ 2007-08-11  8:56 UTC (permalink / raw)
  To: emacs-devel


If I do
C-u C-s [:ascii:]

I get matches for :, a, s, c and i.

That does not jibe with

(info "(elisp) Char Classes")

which is explicitly mentioned in

(info "(elisp) Regexp Special")

How come we have this feature _documented_ in full detail, but not
implemented?

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: What's the deal with character classes in regexps?
  2007-08-11  8:56 What's the deal with character classes in regexps? David Kastrup
@ 2007-08-11  9:27 ` Sven Joachim
  2007-08-11  9:31 ` Stephen J. Turnbull
  2007-08-11  9:36 ` David Hansen
  2 siblings, 0 replies; 6+ messages in thread
From: Sven Joachim @ 2007-08-11  9:27 UTC (permalink / raw)
  To: David Kastrup; +Cc: emacs-devel

David Kastrup <dak@gnu.org> writes:

> If I do
> C-u C-s [:ascii:]
>
> I get matches for :, a, s, c and i.

You need to search for [[:ascii:]] instead.

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

* What's the deal with character classes in regexps?
  2007-08-11  8:56 What's the deal with character classes in regexps? David Kastrup
  2007-08-11  9:27 ` Sven Joachim
@ 2007-08-11  9:31 ` Stephen J. Turnbull
  2007-08-11 10:16   ` David Kastrup
  2007-08-11  9:36 ` David Hansen
  2 siblings, 1 reply; 6+ messages in thread
From: Stephen J. Turnbull @ 2007-08-11  9:31 UTC (permalink / raw)
  To: David Kastrup; +Cc: emacs-devel

David Kastrup writes:

 > If I do
 > C-u C-s [:ascii:]

AIUI the delimiters for such symbols are [: and :].  To specify a
character class containing exactly the ASCII repertoire, use [[:ascii:]].

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

* Re: What's the deal with character classes in regexps?
  2007-08-11  8:56 What's the deal with character classes in regexps? David Kastrup
  2007-08-11  9:27 ` Sven Joachim
  2007-08-11  9:31 ` Stephen J. Turnbull
@ 2007-08-11  9:36 ` David Hansen
  2 siblings, 0 replies; 6+ messages in thread
From: David Hansen @ 2007-08-11  9:36 UTC (permalink / raw)
  To: emacs-devel

On Sat, 11 Aug 2007 10:56:50 +0200 David Kastrup wrote:

> If I do
> C-u C-s [:ascii:]
>
> I get matches for :, a, s, c and i.

Try [[:ascii:]] instead.

David

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

* Re: What's the deal with character classes in regexps?
  2007-08-11  9:31 ` Stephen J. Turnbull
@ 2007-08-11 10:16   ` David Kastrup
  2007-08-11 15:49     ` Werner LEMBERG
  0 siblings, 1 reply; 6+ messages in thread
From: David Kastrup @ 2007-08-11 10:16 UTC (permalink / raw)
  To: Stephen J. Turnbull; +Cc: emacs-devel

"Stephen J. Turnbull" <stephen@xemacs.org> writes:

> David Kastrup writes:
>
>  > If I do
>  > C-u C-s [:ascii:]
>
> AIUI the delimiters for such symbols are [: and :].  To specify a
> character class containing exactly the ASCII repertoire, use [[:ascii:]].

Ah, ok.

Sorry for the noise.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: What's the deal with character classes in regexps?
  2007-08-11 10:16   ` David Kastrup
@ 2007-08-11 15:49     ` Werner LEMBERG
  0 siblings, 0 replies; 6+ messages in thread
From: Werner LEMBERG @ 2007-08-11 15:49 UTC (permalink / raw)
  To: dak; +Cc: stephen, emacs-devel

> >  > If I do
> >  > C-u C-s [:ascii:]
> >
> > AIUI the delimiters for such symbols are [: and :].  To specify a
> > character class containing exactly the ASCII repertoire, use
> > [[:ascii:]].
> 
> Ah, ok.
> 
> Sorry for the noise.

It seems that special syntax deserves an example in the manual...


    Werner

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

end of thread, other threads:[~2007-08-11 15:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-11  8:56 What's the deal with character classes in regexps? David Kastrup
2007-08-11  9:27 ` Sven Joachim
2007-08-11  9:31 ` Stephen J. Turnbull
2007-08-11 10:16   ` David Kastrup
2007-08-11 15:49     ` Werner LEMBERG
2007-08-11  9:36 ` David Hansen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).