[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: regexp question: match anything but not a group?
From: |
Thorsten Jolitz |
Subject: |
Re: regexp question: match anything but not a group? |
Date: |
Fri, 04 Apr 2014 10:53:23 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
> Am 03.04.2014 21:36, schrieb Thorsten Jolitz:
>> Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
>>
>>> Am 01.04.2014 23:30, schrieb Thorsten Jolitz:
>>>>
>>>> Hi List,
>>>>
>>>> how can I write a regexp that acts like e.g.
>>>>
>>>> ,------
>>>> | ".*?"
>>>> `------
>>>>
>>>
>>> BTW looks wrong. .* might much nothing, if non-greedy it remains
>>> nothing (?)
>>
>> But it still seems valid to protect against greedyness?
>>
>
> Coming upon evaluating this, cursor at start of "asdf":
>
> (progn (looking-at ".*")(message (match-string-no-properties 0)))asdf
>
> ==> asdf
>
> (progn (looking-at ".*?")(message (match-string-no-properties 0)))asdf
>
> ==> ""
Yes, it seems you are right ... so this is actually always wrong?
Thanks for the tip ...
--
cheers,
Thorsten
- regexp question: match anything but not a group?, Thorsten Jolitz, 2014/04/01
- Re: regexp question: match anything but not a group?, Andreas Röhler, 2014/04/02
- Re: regexp question: match anything but not a group?, Thorsten Jolitz, 2014/04/03
- Re: regexp question: match anything but not a group?, Stefan Monnier, 2014/04/03
- Re: regexp question: match anything but not a group?, Thorsten Jolitz, 2014/04/04
- Message not available
- Re: regexp question: match anything but not a group?, Loris Bennett, 2014/04/04
- Re: regexp question: match anything but not a group?, Andreas Röhler, 2014/04/04
- Re: regexp question: match anything but not a group?, Thorsten Jolitz, 2014/04/04
- Re: regexp question: match anything but not a group?, Andreas Röhler, 2014/04/04
- Re: regexp question: match anything but not a group?, Andreas Röhler, 2014/04/04
- Re: regexp question: match anything but not a group?,
Thorsten Jolitz <=
Re: regexp question: match anything but not a group?, Andreas Röhler, 2014/04/02
Re: regexp question: match anything but not a group?, Stefan Monnier, 2014/04/03
Re: regexp question: match anything but not a group?, Pascal J. Bourguignon, 2014/04/03