help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: trivial regexp problem


From: Barry Margolin
Subject: Re: trivial regexp problem
Date: Tue, 22 Jan 2013 11:44:51 -0500
User-agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)

In article <address@hidden>,
 Luca Ferrari <address@hidden> wrote:

> Hi all,
> I need a little hint on a regexp that is not working within lookig-at:
> I want to recognize any label of the form "label:" so I tested the
> following against re-search-forward "^[ \t]*.*:" and it works.
> However, the same into a looking-at call is not working, so how can I
> find the following regexp?

What's the purpose of [ \t]* at the beginning of the regexp? Since it's 
immediately followed by .*, which matches anything, the regexp will 
match whether or not the line begins with whitespace.

-- 
Barry Margolin, address@hidden
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


reply via email to

[Prev in Thread] Current Thread [Next in Thread]