Bug 10799 – std.regex: ctRegex lookahead support

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-08-11T13:20:00Z
Last change time
2013-08-11T13:20:59Z
Assigned to
nobody
Creator
dmitry.olsh

Comments

Comment #0 by dmitry.olsh — 2013-08-11T13:20:30Z
Yet another unimplemted corner of ctRegex. Some test cases, basically the same full unrestricted lookahead must be supported. import std.algorithm, std.regex; void main() { auto c1 = ctRegex!("a(?=bc)b"); assert("abc".match(c1).equal!equal([["ab"]])); assert("ab".match(c1).empty); auto c2 = ctRegex!("a(?![a-z]*!)b"); assert("ab".match(c2).equal!equal([["ab"]])); assert("ab!".match(c2).empty); assert("abcd!".match(c2).empty); assert("abcd5!".match(c2).equal!equal([["ab"]])); }
Comment #1 by dmitry.olsh — 2013-08-11T13:20:59Z