Wouldn't that match everything? ----- Original message ----- From: "Yaron" <tclug at freakzilla.com> To: "TCLUG" <tclug-list at mn-linux.org> Date: Fri, 12 Jan 2007 14:37:59 -0600 (CST) Subject: Re: [tclug-list] regular expression that never matches? Can you do something like !"" ? On Fri, 12 Jan 2007, Dan Drake wrote: > I'm looking for a regular expression that's guaranteed to never match > anything. > > I'm working with a Python script that parses LaTeX documents [1], and > I'm using a regexp to find comments (beginning of line, any whitespace, > then a percent sign: "^\s*%"). But in the middle of the verbatim > environment, it shouldn't interpret anything as comments -- so I'd like > to use some sort of regexp that never matches, so I can just switch the > particular regexp object I'm using while parsing such an environment. > > Any suggestions? I could randomly generate a bizarre string (like > "\y;$j[3o*6I[/W~fq\+l|~yr~as") which in practical terms will work, but > that's an ugly solution. > > TIA for the help. > > Dan > > 1. http://www.pps.jussieu.fr/~beffara/soft/rubber/ > -- > Ceci n'est pas une .signature. > -Yaron -- _______________________________________________ TCLUG Mailing List - Minneapolis/St. Paul, Minnesota tclug-list at mn-linux.org http://mailman.mn-linux.org/mailman/listinfo/tclug-list