[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Help with regexp
From: |
Andreas Politz |
Subject: |
Re: Help with regexp |
Date: |
Wed, 02 Dec 2009 07:03:02 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
tomas@tuxteam.de writes:
> On Tue, Dec 01, 2009 at 10:07:46PM +0100, Pascal J. Bourguignon wrote:
>> Xavier Maillard <xma@gnu.org> writes:
>>
>> > Hi,
>> >
>> > I am trying to find the regexp that could match on these:
>> >
>> > "=>foo"
>
> [...]
>
>> "=>\\([^:]*\\(\\|:[^:]*\\(\\|:[^:]*\\)\\)\\)"
>
> Wow, Pascal. You have taught this old dog a new trick. Up to now, I
> hadn't thought of putting an alternative (i.e. "|") at the start of a
> parenthesized sub-expression. Thanks :-)
>
> -- tomás
Since this topic is more or less closed (modulo escaped delimiter), we
could use it to discuss the question, why using non-trivial Emacs regexp
makes one feel like Chomsky had just written his influential book on
grammars.
Vim, the other editor, has updated and extended it's regexp engine
frequently in it's version history, while Emacs regexp never seemed to
be on top of antibody's to-do list ?
Things I (won't) miss most:
- extreme backslasheritis
- no short aliases for important constructs :
digits,symbol-constituents,newline,space
- no zero-width matches ; look(ahead|behind)
-ap
- Help with regexp, Xavier Maillard, 2009/12/01
- Message not available
- Re: Help with regexp, harven, 2009/12/02
- Re: Help with regexp, Andreas Politz, 2009/12/02
- Re: Help with regexp, Lennart Borgman, 2009/12/02
- Re: Help with regexp, Andreas Politz, 2009/12/02
- Re: Help with regexp, Lennart Borgman, 2009/12/02
- Message not available
- Re: Help with regexp, harven, 2009/12/02