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. Mike