[Top][All Lists]

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

Re: Negating a regexp

From: tomas
Subject: Re: Negating a regexp
Date: Thu, 20 May 2021 12:39:17 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, May 20, 2021 at 05:29:50PM +0700, Yuri Khan wrote:
> > > How could I negate the regexp that I have defined?
> >
> > I don't even know what you mean by "negating a regexp".
> The automata theory, where the notion of a regexp comes from, defines
> a “regular set” [...]

A beautiful theory, indeed. In that context, "negation" has a definite
meaning (but, as you wrote: anchoring, yadda, yadda).

I'm almost sure this is *not* what steve-humphreys had in mind (but
hey, I've been wrong before [1]!).

> So, to steve-humphreys: There is no practical general way to negate a
> regexp. You need to either negate the result of attempting to match,
> or to think hard and write a new regexp that matches what you want.

Exactly. I think that, to get some help here, steve will have to
refine his idea a bit for us to have a chance of making some sense
of it.

[1] This is, as you might suspect, a shameless understatement :)
-- t

Attachment: signature.asc
Description: Digital signature

reply via email to

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