all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Selecting rx expressions
@ 2022-08-14 21:04 uzibalqa via Users list for the GNU Emacs text editor
  0 siblings, 0 replies; only message in thread
From: uzibalqa via Users list for the GNU Emacs text editor @ 2022-08-14 21:04 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org

I am using `rx' for constructing the equivalent of string regexp. Specifically I am matching character sequences
occurring at the beginning of words and at the end of words.

Have come up with two versions for each. What versions would be preferable, if at all ?

For matching start of words

Version 1

(seq bow
(group
(or (seq "co"
(any "glmnr"))
"coun" "cum")))

Verion 2

(seq word-start
(or (seq "co" (any "glmnr")) "coun" "cum")

For matching end of words

Version A

(seq (group
(or "ley" "ily" "ly")) eow)

Version B

(seq (or "ley" "ily" "ly") word-end )

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-14 21:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-14 21:04 Selecting rx expressions uzibalqa via Users list for the GNU Emacs text editor

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.