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

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

Re: regexp question: match anything but not a group?


From: Andreas Röhler
Subject: Re: regexp question: match anything but not a group?
Date: Fri, 04 Apr 2014 08:37:26 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

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

==> ""






reply via email to

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