From: Pascal Bourguignon <pjb@informatimago.com>
Subject: Re: regexp problem
Date: Sat, 12 Aug 2006 05:56:37 +0200 [thread overview]
Message-ID: <87slk24ney.fsf@thalassa.informatimago.com> (raw)
In-Reply-To: 1155353594.291023.218010@i42g2000cwa.googlegroups.com
"Þorne" <ego111@gmail.com> writes:
> Is there a way to match only `b' if and only if it appears in the
> context `abc' ?
>
> So searching `foo abc b ' would return a match of `b' but `bar xbc'
> would not return any matches.
You can match groups:
a\(b\)c
so the match number 0 is the whole regexp: abc
but the match number 1 is only b
--
__Pascal Bourguignon__ http://www.informatimago.com/
"Debugging? Klingons do not debug! Our software does not coddle the
weak."
next prev parent reply other threads:[~2006-08-12 3:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-12 3:33 regexp problem Þorne
2006-08-12 3:56 ` Pascal Bourguignon [this message]
2006-08-12 9:46 ` Þorne
2006-08-12 10:12 ` Pascal Bourguignon
2006-08-12 11:02 ` Þorne
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=87slk24ney.fsf@thalassa.informatimago.com \
--to=pjb@informatimago.com \
/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).