#<<BYE<div><br></div><div>Hello,<br clear="all"><br><div class="gmail_quote">On Sat, Jun 4, 2011 at 11:27, Jens Axel Søgaard <span dir="ltr"><<a href="mailto:jensaxel@soegaard.net">jensaxel@soegaard.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">2011/6/4 Rodolfo Carvalho <<a href="mailto:rhcarvalho@gmail.com">rhcarvalho@gmail.com</a>>:<br>
<div class="im">> Hello,<br>
> I'm curious about 2 design decisions made:<br>
> 1) Why do I have to escape things like "\d{2}" -> "\\d{2}"?<br>
<br>
</div>You can actually avoid escaping if you use here strings.<br>
See the example below.<br>[...]</blockquote></div><br></div><div><br></div><div>Good to learn about here strings. I've seen them somewhere but never paid much attention.</div><div><br></div><div>For short strings I'd rather type things like "\\\\" than</div>
<div>#<<END</div><div>\\</div><div>END</div><div><br></div><div>Because the latter is more verbose and breaks the visual flow.</div><div><br></div><div>Both `#<<END' and `END' must come in their own lines, and no line breaks are considered immediately after and before these tokens, respectively (reasonable).</div>
<meta http-equiv="content-type" content="text/html; charset=utf-8"><meta http-equiv="content-type" content="text/html; charset=utf-8"><div><br></div><div><br></div><div>Many thanks for this thread! It deserves a post on my blog :D</div>
<div><br></div><div>BYE</div>