phobos
phobos copied to clipboard
regex and ctRegex give different results
I find regex and ctRegex give different results.
import std.stdio;
import std.regex;
void main()
{
auto reg = ctRegex!("^(1+)\\1+$");
foreach (i; 2..100)
{
char[] s = new char[i];
s[] = '1';
if (!s.matchFirst(reg))
{
writeln(i);
}
}
}
And both seem buggy.
First post there https://github.com/dlang/dmd/discussions/15029#discussion-4995797