GNU bug report logs -
#1877
Request: Regular expressions that can match Unicode general categories
Previous Next
Full log
Message #10 received at 1877 <at> debbugs.gnu.org (full text, mbox):
Derick Eddington <derick.eddington <at> gmail.com> writes:
> A new Scheme major mode I've made [1] requires regular expressions that
> can match characters by their Unicode general categories. It seems
> Emacs regular expressions do not provide a way to do that directly (I'm
> using GNU Emacs 23.0.60.1)
(I'm going through old bug reports that unfortunately didn't get any
response at the time.)
I'm not quite sure what Unicode general categories you're referring to,
but the Emacs regexp matcher has gained a bunch of categories in the ten
years since you made the request.
Are the categories below what you were thinking of?
‘[:print:]’
This matches any printing character—either whitespace, or a graphic
character matched by ‘[:graph:]’.
‘[:punct:]’
This matches any punctuation character. (At present, for multibyte
characters, it matches anything that has non-word syntax.)
‘[:space:]’
This matches any character that has whitespace syntax (*note Syntax
Class Table::).
‘[:upper:]’
This matches any upper-case letter, as determined by the current
case table (*note Case Tables::). If ‘case-fold-search’ is
non-‘nil’, this also matches any lower-case letter.
‘[:word:]’
This matches any character that has word syntax (*note Syntax Class
Table::).
(etc)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 3 years and 193 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.