|
From: | Emanuel Berg |
Subject: | Re: How to get a concatenation of the negations with rx (ex: [^a][^b])? |
Date: | Sat, 11 Nov 2023 22:00:12 +0100 |
User-agent: | Gnus/5.13 (Gnus v5.13) |
Edgar Lux wrote: > 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]" (rx (not (any "a" "b"))) "[^ab]" ? -- underground experts united https://dataswamp.org/~incal
[Prev in Thread] | Current Thread | [Next in Thread] |