From: David Maus <maus.david@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Question on re-search-forward and infinite loop
Date: Mon, 30 Nov 2009 09:24:34 +0100 [thread overview]
Message-ID: <87zl64mnct.wl%maus.david@gmail.com> (raw)
In-Reply-To: <barmar-EAB185.18171626112009@news.eternal-september.org>
Hi there,
At Thu, 26 Nov 2009 18:17:16 -0500,
Barry Margolin wrote:
>
> Your regexp matches zero or more whitespace characters at the beginning
> of a line. If there's an empty line at the end of the buffer, it will
> match that. But since it's a zero-length match, point is left at that
> position, and the next time around it again matches it.
>
> In general, whenever a regexp can match a zero-length string, I think
> that type of loop will go infinitely.
Thanks, this makes perfect sense to me.
Regards,
-- David
--
OpenPGP... 0x316F4BE4670716FD
Jabber.... dmjena@jabber.org
Email..... maus.david@gmail.com
ICQ....... 241051416
next prev parent reply other threads:[~2009-11-30 8:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.11588.1259269277.2239.help-gnu-emacs@gnu.org>
2009-11-26 23:17 ` Question on re-search-forward and infinite loop Barry Margolin
2009-11-30 8:24 ` David Maus [this message]
2009-11-26 21:01 David Maus
2009-11-26 21:11 ` Lennart Borgman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zl64mnct.wl%maus.david@gmail.com \
--to=maus.david@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).