[Issue 5674] AssertError in std.regex
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Mar 31 07:12:38 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5674
Magnus Lie Hetland <magnus at hetland.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |magnus at hetland.org
--- Comment #1 from Magnus Lie Hetland <magnus at hetland.org> 2011-03-31 07:09:07 PDT ---
I have similar problems with stuff like this:
import std.stdio, std.regex;
void main() {
foreach (m; match("abc", "a|(x)")) {
foreach (e; m.captures) {
writeln(e);
}
}
}
Here it prints out "a" and then I get a range violation. Whether or not
m.captures[1] exists, iterating over m.captures should be possible?
Also: Checking whether m.captures[1] exists would be highly useful -- to see
what has matched. (Doing this by length wouldn't work in general, of course.)
--
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