Is str ~ regex the root of all evil, or the leaf of all good?

bearophile bearophileHUGS at lycos.com
Thu Feb 19 04:34:43 PST 2009


Michel Fortin:
> 	foreach(e; "co" in "conoco")
> 		writeln(e);
> should work too.

Of course :-) I think eventually it will work, it's handy and natural.


> By the way, regular expressions should work everywhere where we can 
> search for a string. For instance (from std.string):
> 	auto firstMatchIndex = find("conoco", "co");
> should work with a regex too:
> 	auto firstMatchIndex = find("abracazoo", regex("a[b-e]", "g"));

I agree, I have said the same thing regarding splitter()/xsplitter().

Bye,
bearophile



More information about the Digitalmars-d mailing list