unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to get a concatenation of the negations with rx (ex: [^a][^b])?
@ 2023-11-11 20:17 Edgar Lux
  2023-11-11 21:00 ` Emanuel Berg
  2023-11-12  7:03 ` Michael Heerdegen
  0 siblings, 2 replies; 11+ messages in thread
From: Edgar Lux @ 2023-11-11 20:17 UTC (permalink / raw)
  To: Help Gnu Emacs

Hello. I am trying to get this regular expression:

    "[^a][^b]"

in an easier way. I thought that I could do 

    (rx (not (seq "a" "b")))

but that got me 

    Debugger entered--Lisp error: (error "Illegal argument to rx ‘not’: (seq \"a\" \"b\")")

The error is very clear, but I would like to know if there is a smart way of achieving the same without having to type:

    (rx (seq (not "a") (not "b")))

which produces

    "[^a][^b]"

Thank you very much.

-- 
Sent with https://mailfence.com  
Secure and private email



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-12-24 11:54 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-11 20:17 How to get a concatenation of the negations with rx (ex: [^a][^b])? Edgar Lux
2023-11-11 21:00 ` Emanuel Berg
2023-11-13 19:26   ` tomas
2023-11-12  7:03 ` Michael Heerdegen
2023-11-12  7:26   ` tomas
2023-11-12  8:28     ` Yuri Khan
2023-11-12 10:38       ` tomas
2023-11-12 11:53         ` Michael Heerdegen
2023-11-13  8:46         ` Anders Munch
2023-11-13  9:24           ` tomas
2023-12-24 11:54             ` tomas

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).