all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "rgb" <rbielaws@i1.net>
Subject: Re: re-search repeat by \{N\} not working. Bug?
Date: 22 Aug 2005 15:39:10 -0700	[thread overview]
Message-ID: <1124750350.251867.22430@g43g2000cwa.googlegroups.com> (raw)
In-Reply-To: mailman.4682.1124743817.20277.help-gnu-emacs@gnu.org

> "\ [A-Z]\{3\}\ "
>
> should find a 3letter Word surrounded by blanks
>

I'm not sure of your indended purpose in the "\ "
sequence but I'd guess that could be your problem.

All these work fine for me.  Each matches 3 letter words
with slight differences in what constitutes a word.  For
example the first won't match a word if it begins in the
first column or ends in the last column of a line or is
delimited by punctuation such as a period or comma or is
preceeded or followed by a tab rather than a space.  The
2nd allows for tab characters and possibly eol but not
punctuation.  The 3rd and 4th are very similar.  They
allow punction, tab, space and eol characters and differ
only in whether the delimiting character is considered
part of the match or just required but not actually part
of it.

Interactively typed          String used programmatically
 [A-Za-z]\{3\} <ret>         " [A-Za-z]\\{3\\} "
\s-[A-Za-z]\{3\}\s-<ret>     "\\s-[A-Za-z]\\{3\\}\\s-"
\Sw[A-Za-z]\{3\}\Sw<ret>     "\\Sw[A-Za-z]\\{3\\}\\Sw"
\b[A-Za-z]\{3\}\b<ret>       "\\b[A-Za-z]\\{3\\}\\b"

  parent reply	other threads:[~2005-08-22 22:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-21 16:00 re-search repeat by \{N\} not working. Bug? Friedrich Laher
2005-08-22 18:50 ` Kevin Rodgers
2005-08-22 20:41   ` Friedrich Laher
     [not found]   ` <mailman.4682.1124743817.20277.help-gnu-emacs@gnu.org>
2005-08-22 22:39     ` rgb [this message]
2005-08-23  5:36       ` Friedrich Laher
     [not found]       ` <mailman.4718.1124776601.20277.help-gnu-emacs@gnu.org>
2005-08-23 10:00         ` Johan Bockgård

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1124750350.251867.22430@g43g2000cwa.googlegroups.com \
    --to=rbielaws@i1.net \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.