News for hackers. Stuff that matters.
Re:Irregular Expressions by mcyc on Sunday April 09, 2023 @03:36PM (#35505716)
The parent comment asked specifically about negating the finality of each state, which I addressed. As for how to actually implement complement in a regex engine, there are certainly some strategies like the one you mentioned that could be used (but the point of my comment was that just swapping final/non-final states is not a valid one).
Re:Irregular Expressions by zeroimpl on Sunday April 09, 2023 @05:16PM (#35506547)
Ah I thought they meant flipping the finality of the final state, but I guess they said "states" so your interpretation makes more sense.