> According to this: <a href="http://dlang.org/phobos/std_regex.html#.replace" target="_blank">http://dlang.org/phobos/std_<u></u>regex.html#.replace</a> you can use the same escape sequences for both (\c -> c in the replacement string).<br>
<br>Your suggestion does not work; try for yourself by replacing the $$ by \$ in my code. Is that a bug in std.regex' doc?<div>eg:</div><div>replace("",regex(``),`\$`);</div><div>=> invalid format string in regex replace</div>
<div><br></div><div>However everything works fine with $$, see my code above.</div><div><br></div><div>On Thu, May 30, 2013 at 1:14 AM, Diggory <span dir="ltr"><<a href="mailto:diggsey@googlemail.com" target="_blank">diggsey@googlemail.com</a>></span> wrote:<br>
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Thursday, 30 May 2013 at 06:50:06 UTC, Timothee Cour wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
ok, here it is:<br>
<br>
<a href="https://github.com/timotheecour/dtools/blob/master/dtools/util/util.d#L78" target="_blank">https://github.com/<u></u>timotheecour/dtools/blob/<u></u>master/dtools/util/util.d#L78</a><br>
simplified implementation and added missing escape symbols. Any symbol<br>
missing?<br>
I was basing myself based on <a href="http://dlang.org/phobos/std_regex.html" target="_blank">http://dlang.org/phobos/std_<u></u>regex.html</a>, table<br>
entry '\c where c is one of', but that was incomplete. I'm also noting that<br>
table entry 'any character except' is also incomplete.<br>
<br>
</div><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Technically any working "escapeRegex" would also function as a valid<br>
</blockquote>
"escapeRegexReplace", although it might be slightly faster to have a<br>
specialised one.<br>
<br></div><div class="im">
not sure, because they escape differently (\$ vs $$).<br>
</div></blockquote>
<br>
According to this: <a href="http://dlang.org/phobos/std_regex.html#.replace" target="_blank">http://dlang.org/phobos/std_<u></u>regex.html#.replace</a> you can use the same escape sequences for both (\c -> c in the replacement string).<br>

</blockquote></div><br></div>