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

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

Re: Help with regexp


From: Colin S. Miller
Subject: Re: Help with regexp
Date: Wed, 02 Dec 2009 15:37:32 +0000
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706)

Xavier Maillard wrote:
Hi,

I am trying to find the regexp that could match on these:

"=>foo"
"=>foo:bar"
"=>foo:bar:baz"

The regexp must match on all of these strings. The string can't
be deeper than 3 levels (like latest example) and each component
may have spaces.

How can I match this ?

Regards

        Xavier


If you don't want to pick out the components using \1 etc, then

=>\([a-z ]+:\)\{0,2\}[a-z ]+

should work

HTH,
Colin S. Miller


--
Replace the obvious in my email address with the first three letters of the 
hostname to reply.


reply via email to

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