[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-janitors] #1065: irregex-match with `look-ahead` doesn't be
From: |
Chicken Trac |
Subject: |
Re: [Chicken-janitors] #1065: irregex-match with `look-ahead` doesn't behave like the example in the docs |
Date: |
Sat, 16 Nov 2013 12:23:33 -0000 |
#1065: irregex-match with `look-ahead` doesn't behave like the example in the
docs
-----------------------------+----------------------------------------------
Reporter: evhan | Owner:
Type: defect | Status: closed
Priority: major | Milestone: 4.9.0
Component: core libraries | Version: 4.8.x
Resolution: fixed | Keywords: irregex
-----------------------------+----------------------------------------------
Changes (by sjamaan):
* status: new => closed
* resolution: => fixed
Comment:
This is actually correct, and not a bug: irregex-match returns a match
only if the full string matches the regex (ie, the regex is implicitly
anchored at the start and end). Your regex here does a lookahead on "
expression", but does not actually consume that part.
If you use irregex-search, it'll return the expected value. So this is a
documentation bug; I've fixed it upstream and added a few tests for
positive/negative look-ahead and look-behind, just in case :)
Found a bug in the chunk handling of look-behind while working on these
tests, so thanks for that!
--
Ticket URL: <http://bugs.call-cc.org/ticket/1065#comment:2>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.