Re: std.regex.replace issues

2011-03-17 Thread Andrej Mitrovic
Okie.

Re: std.regex.replace issues

2011-03-17 Thread Jesse Phillips
Andrej Mitrovic Wrote: > You're right, that point totally slipped my mind. I'm having some > ideas about an alternative though. I'll try something out later. > > Btw, shouldn't byLine be able to return a dchar[]? For Unicode purposes? Why, if you want to operate on a dchar[] instead of a dchar r

Re: std.regex.replace issues

2011-03-17 Thread Andrej Mitrovic
You're right, that point totally slipped my mind. I'm having some ideas about an alternative though. I'll try something out later. Btw, shouldn't byLine be able to return a dchar[]? For Unicode purposes?

Re: std.regex.replace issues

2011-03-17 Thread Jesse Phillips
Andrej Mitrovic Wrote: > char[] replacement; > foreach (char[] line; file.byLine()) > { > replacement = line.replace(regex("->"), ".") > .replace(regex("::"), ".") > .replace(regex("//.*"), "") >

std.regex.replace issues

2011-03-17 Thread Andrej Mitrovic
I've tried using this: auto file = File("file.cpp", "r"); char[] replacement; foreach (char[] line; file.byLine()) { replacement = line.replace(regex("//.*"), "."); // do something with replacement while its still alive.. } This gives me this bombshell of an er

Re: std.regex.replace

2009-07-29 Thread Stewart Gordon
Vladimir Voinkov wrote: std.regex.replace does not compile with wstring: Correct. Stewart.

std.regex.replace

2009-07-29 Thread Vladimir Voinkov
std.regex.replace does not compile with wstring: auto x = std.regex.regex ("abc"w); wchar[] buffer = "abc"w.dup; std.regex.replace (buffer, x, "def"w);