[pcre-dev] [Bug 1203] desired features: match-and-substitute…

Top Page

Reply to this message
Author: Steve Andrews
To: pcre-dev
Subject: [pcre-dev] [Bug 1203] desired features: match-and-substitute and permutations
------- You are receiving this mail because: -------
You are on the CC list for the bug.


--- Comment #7 from Steve Andrews <steven.s.andrews@???> 2012-01-29 06:31:31 ---
Thanks. I'm fairly new to regular expressions, so I'm glad to learn about
lookaheads. Overall though, I'm starting to get the sense that
standardized regular expressions aren't the right tool for my task. They
seem to have a huge number of features that I don't need and they aren't
particularly elegant for the few options that I do need. What I really
need, I think, is a slightly enhanced version of wildcard matching, and
that's something that I can write myself fairly easily. Thanks anyhow


On Sat, Jan 28, 2012 at 2:16 AM, Philip Hazel <ph10@???> wrote:

> ------- You are receiving this mail because: -------
> You reported the bug.
> http://bugs.exim.org/show_bug.cgi?id=1203
> --- Comment #6 from Philip Hazel <ph10@???> 2012-01-28 10:16:52
> ---
> On Fri, 27 Jan 2012, Steve Andrews wrote:
> > Here, I think that an ampersand is both the sensible operator for this
> use,
> > and is well-defined. It's sensible because the interpretation of abc&def
> > is that both abc AND def must be in the string, but either order is
> allowed.
> If that is all you want, then lookaheads can help:
> /^(?=.*?abc)(?=.*?def)/
> And capturing works inside positive lookaheads, so you could capture
> substrings if you wanted.
> Philip
> --
> Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email