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

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

Re: Help with regexp


From: Pascal J. Bourguignon
Subject: Re: Help with regexp
Date: Wed, 02 Dec 2009 12:16:31 +0100
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/22.3 (darwin)

Xavier Maillard <address@hidden> writes:

> Hi Pascal
>
>    "=>\\([^:]*\\(\\|:[^:]*\\(\\|:[^:]*\\)\\)\\)"
>
> Awesome !
>
> Would you mind explaining it to me step by step in plain english
> please ? :)


(insert   "=>\\([^:]*\\(\\|:[^:]*\\(\\|:[^:]*\\)\\)\\)") C-x C-e
gives:
=>\([^:]*\(\|:[^:]*\(\|:[^:]*\)\)\)

Now parse it:

   =>  \(  [^:]*  \( \| : [^:]* \( \| : [^:]* \) \) \)

   equal superior, 
           followed by any number of non colon, 
                   followed by either nothing or
                        a colon followed by any number of non colon,
                                  followed by either nothing or
                                      a colon followed by any number of non 
colon.

                             

-- 
__Pascal Bourguignon__


reply via email to

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