[Issue 2108] regexp.d: The greedy dotstar isn't so greedy
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu May 6 14:30:42 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=2108
Jesse Phillips <Jesse.K.Phillips+D at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |Jesse.K.Phillips+D at gmail.co
| |m
OS/Version|Linux |All
--- Comment #2 from Jesse Phillips <Jesse.K.Phillips+D at gmail.com> 2010-05-06 14:30:40 PDT ---
This is also an issue in Windows with std.regex using DMD 2.043
But I would like to add that it is always greedy prior to text. The first
assert will fail since it was not non-greedy and the second is what it should
be.
import std.regex;
void main() {
assert(match("Hello there you silly person you.",
regex(r"\b.+? you .+\w")).hit != "Hello there you silly");
assert(match("Hello there you silly person you.",
regex(r"\b.+? you .+\w")).hit == "there you silly person");
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list