From: Brian Candler Date: 2007-03-17T07:12:41+09:00 Subject: Re: [Slightly OT] Case against ".*" regexp On Sat, Mar 17, 2007 at 05:10:08AM +0900, Robert Klemme wrote: > On 16.03.2007 20:58, Edgardo Hames wrote: > >Some time ago I remember reading a post in this list against using > >".*" regexp but I cannot find it -- I guess I don't remember the right > >keywords :( > >Does anyone remember that? > > Not exactly. But you should not use ".*" nested in another starred > expression because that will usually lead to massive backtracking. > Another problem is, that ".*" matches the empty string which is often > not what you want. And also eats as much string as it can without causing the regexp to fail - .*? is the non-greedy form.