From: Kenichi Handa <handa@m17n.org>
Cc: emacs-devel@gnu.org
Subject: Re: category codes and regexps
Date: Mon, 26 Jul 2004 08:59:57 +0900 (JST) [thread overview]
Message-ID: <200407252359.IAA03317@etlken.m17n.org> (raw)
In-Reply-To: <20040725.225927.239650643.wl@gnu.org> (message from Werner LEMBERG on Sun, 25 Jul 2004 22:59:27 +0200 (CEST))
In article <20040725.225927.239650643.wl@gnu.org>, Werner LEMBERG <wl@gnu.org> writes:
> Assume that I want to check a buffer for characters which aren't Thai,
> and which aren't in the range a-z. My first idea was this:
> [^\cta-z]
> This fails because `\' isn't special within [...]. What's the correct
> (interactive) way to do that? I tried hard without finding a regexp
> which can handle this.
Unfortunately [...] can't be used with category nor syntax.
[ ^ a - z ESC : (insert (make-char 'thai-tis620 #x20)) RET
- ESC : (insert (make-char 'thai-tis620 #x7f)) RET
]
will produce a regex that you want.
Another way is to make a new category (say, menumonic `T')
that contains a-z and Thai. Then you can specify:
\CT
---
Ken'ichi HANDA
handa@m17n.org
next prev parent reply other threads:[~2004-07-25 23:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-25 20:59 category codes and regexps Werner LEMBERG
2004-07-25 23:59 ` Kenichi Handa [this message]
2004-07-26 2:05 ` Werner LEMBERG
2004-07-26 19:26 ` Stefan Monnier
2004-07-26 19:48 ` David Kastrup
2004-07-26 21:14 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200407252359.IAA03317@etlken.m17n.org \
--to=handa@m17n.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).