[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: category codes and regexps
From: |
Kenichi Handa |
Subject: |
Re: category codes and regexps |
Date: |
Mon, 26 Jul 2004 08:59:57 +0900 (JST) |
User-agent: |
SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.3 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) |
In article <address@hidden>, Werner LEMBERG <address@hidden> 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
address@hidden