From: Lars Ingebrigtsen <larsi@gnus.org>
To: Derick Eddington <derick.eddington@gmail.com>
Cc: 1877@debbugs.gnu.org
Subject: bug#1877: Request: Regular expressions that can match Unicode general categories
Date: Mon, 30 Sep 2019 09:45:15 +0200 [thread overview]
Message-ID: <87zhimfcs4.fsf@gnus.org> (raw)
In-Reply-To: <1231792692.22467.115.camel@eep> (Derick Eddington's message of "Mon, 12 Jan 2009 12:38:12 -0800")
Derick Eddington <derick.eddington@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
next prev parent reply other threads:[~2019-09-30 7:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-12 20:38 bug#1877: Request: Regular expressions that can match Unicode general categories Derick Eddington
2019-09-30 7:45 ` Lars Ingebrigtsen [this message]
2019-09-30 8:45 ` Eli Zaretskii
2021-11-14 6:28 ` Lars Ingebrigtsen
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zhimfcs4.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=1877@debbugs.gnu.org \
--cc=derick.eddington@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.