In article , Peter Dyballa wrote: > Am 22.01.2013 um 17:44 schrieb Barry Margolin: > > > Since it's > > immediately followed by .*, which matches anything, the regexp will > > match whether or not the line begins with whitespace. > > Yes, it not only matches the beginning of every line, it also matches the > beginning of every empty lineŠ That's not an issue, because the regexp includes ":". So it only matches on lines that contain a colon. But there's no difference between: ^[ \t]*.*: and: ^.*: There *would* be a difference if you used grouping, e.g.: ^\([ \t]*\)\(.*\): because this allows you to extract the whitespace prefix and the part of the line after it. -- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me ***