On 1/15/07, Mike Miller <mbmiller at taxa.epi.umn.edu> wrote: > On Mon, 15 Jan 2007, wrote: > > > On 1/12/07, Dan Drake <dan at dandrake.org> wrote: > > > >> I'm looking for a regular expression that's guaranteed to never match > >> anything. > > > > Ive used $^ before. But it does depend on how you are using it. the > > end-of-string followed by a beginning-of-string can show up if $ and ^ > > match new-lines. > > > I don't understand how that can fail. How can $ and ^ match newlines? > Is that something that can be affected by command line arguments? When I > tried it, it seemed to work very well, so I like your idea. It does not > match anything in a string of consecutive newlines, for example. > Im not a big python person, but in perl if you add the m modifier for "multiple lines" it changes the definition of ^ and $ to match newlines. I assumed python would have something like it. As long as they keep their standard definitions, though, you should never find the end of a string before the beginning. -- Jay Kline http://www.slushpupie.com/