[pcre-dev] [Bug 1393] the opposite of a reference

Top Page
Delete this message
Author: ouadji
Date:  
To: pcre-dev
Subject: [pcre-dev] [Bug 1393] the opposite of a reference
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1393




--- Comment #3 from ouadji <ouadji@???> 2013-10-08 17:16:49 ---
"What do you mean by 'all except "xyz"'?
Do you mean "match 3 characters,but not 'xyz'"?

yes, 3 characters,but not 'xyz'. (xya, xxx, 12z ...)

"You can get whatever effect you want by using a lookahead.
For example: (xyz)(?!\1)

no.
(3)(?!\1) ... matches 3 from input string a3bc
the term (?!\1) is just a conditional term,
but (?!\1)is not included in the match.
The good résult would be 3b.

"Nothing like you suggest exists in Perl ..."

I suspected a answer like this one. I understand, but it's a pity.
i think that be able to get the opposite of a reference would be sometimes a
very useful feature ! (in Perl and therefore also in PCRE)
but like you say, if nothing like i suggest exists in Perl
... then this is a dead end. :-)

Regards,
ouadji,


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