[regex-coach] Regex Coach \K option fails?

From the PCRE docs: The escape sequence \K causes any previously matched characters not to be included in the final matched sequence. For example, the pattern: foo\Kbar matches "foobar", but reports that it has matched "bar". http://www.pcre.org/pcre.txt This fails in The Regex Coach. Why? Thanks

Hi, Regex Coach is not based on the C library PCRE. It's based on CL-PPCRE which is a Lisp library I wrote myself. You can find a link to it and its documentation on the website. Cheers, Edi. On Mon, Jun 13, 2011 at 8:42 PM, mike <mike@illsoft.com> wrote:
From the PCRE docs:
The escape sequence \K causes any previously matched characters not to be included in the final matched sequence. For example, the pattern:
foo\Kbar
matches "foobar", but reports that it has matched "bar".
This fails in The Regex Coach. Why?
Thanks
_______________________________________________ regex-coach site list regex-coach@common-lisp.net http://common-lisp.net/mailman/listinfo/regex-coach

I see, thanks. I checked that page but I don't see any mention of the \K option. Am I to assume that its not supported in your library? Is there a similar switch? Thanks, Mike On 6/13/2011 2:53 PM, Edi Weitz wrote:
Hi,
Regex Coach is not based on the C library PCRE. It's based on CL-PPCRE which is a Lisp library I wrote myself. You can find a link to it and its documentation on the website.
Cheers, Edi.
On Mon, Jun 13, 2011 at 8:42 PM, mike<mike@illsoft.com> wrote:
From the PCRE docs:
The escape sequence \K causes any previously matched characters not to be included in the final matched sequence. For example, the pattern:
foo\Kbar
matches "foobar", but reports that it has matched "bar".
This fails in The Regex Coach. Why?
Thanks
_______________________________________________ regex-coach site list regex-coach@common-lisp.net http://common-lisp.net/mailman/listinfo/regex-coach
_______________________________________________ regex-coach site list regex-coach@common-lisp.net http://common-lisp.net/mailman/listinfo/regex-coach

On Mon, Jun 13, 2011 at 9:10 PM, mike <mike@illsoft.com> wrote:
I checked that page but I don't see any mention of the \K option. Am I to assume that its not supported in your library?
Right. Actually, until now I had never heard of the \K switch (or I forgot about it). CL-PPCRE is largely modeled on Perl (at a particular point in time) and when I wrote CL-PPCRE, Perl didn't have \K.
Is there a similar switch?
From a quick look at the PCRE docs I'd say that some of the \K behavior can probably be emulated using look-behind assertions.

Ok, thanks for your help Mike On 6/13/2011 3:19 PM, Edi Weitz wrote:
On Mon, Jun 13, 2011 at 9:10 PM, mike<mike@illsoft.com> wrote:
I checked that page but I don't see any mention of the \K option. Am I to assume that its not supported in your library?
Right. Actually, until now I had never heard of the \K switch (or I forgot about it). CL-PPCRE is largely modeled on Perl (at a particular point in time) and when I wrote CL-PPCRE, Perl didn't have \K.
Is there a similar switch?
From a quick look at the PCRE docs I'd say that some of the \K behavior can probably be emulated using look-behind assertions.
_______________________________________________ regex-coach site list regex-coach@common-lisp.net http://common-lisp.net/mailman/listinfo/regex-coach

Ah-HA! Now it all falls into place. You were tired of Lisping when you typed, and so needed something to quickly find-and-replace those anomalous distortions. The universe is starting to make more and more sense. On 2011-06-13, at 2:53 PM, Edi Weitz wrote:
Regex Coach is not based on the C library PCRE. It's based on CL-PPCRE which is a Lisp library I wrote myself.
-- Frank Marion lists [_at_] frankmarion.com
participants (3)
-
Edi Weitz
-
Frank Marion
-
mike