SPUG: minimal unmatching regex
jjuran at gmail.com
Tue Aug 18 21:58:44 PDT 2009
On Aug 18, 2009, at 12:04 PM, Michael R. Wolf wrote:
> What's the smallest (comprehensible) regex that's guaranteed to
> fail against all input?
> I'm creating a lab for perl classes. I want to provide the stub of
> a script that compiles, but always fails to match. Unfortunately,
> the obvious minimal RE of // matches *everything*.
I don't know the syntax of the top off my head, but here's the logic:
* beginning of string (not strictly necessary, but a useful
* negative lookahead assertion for X
More information about the spug-list