[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: regexp problem
From: |
Pascal Bourguignon |
Subject: |
Re: regexp problem |
Date: |
Sat, 12 Aug 2006 05:56:37 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
"Þ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."
- regexp problem, Þorne, 2006/08/11
- Re: regexp problem,
Pascal Bourguignon <=