in reply to The craziest RegExes you ever created

Mine was implementing negative lookaround assertions with plain grep -E. I did it for detecting cross-posts between certain newsgroups. The precise regex I used was anchored to the beginning of the line:


I even made some pseudo-algorithm for building more:

^ ([^e]|e ([^s]|s ([^\.]|\. ([^c]|c <blah> ([^n]|n ([^u]|u [^x] )))))))))))))))

But didn't bother to automate it. In fact, I've never used this again.

David Serrano