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.

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

Attachment: signature.asc
Description: Digital signature

Reply via email to