help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to get a concatenation of the negations with rx (ex: [^a][^b])?


From: Edgar Lux
Subject: How to get a concatenation of the negations with rx (ex: [^a][^b])?
Date: Sat, 11 Nov 2023 21:17:49 +0100 (CET)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]