On Thu, Mar 11, 2010 at 8:36 PM, Travis Griggs <span dir="ltr">&lt;<a href="mailto:travisgriggs@gmail.com">travisgriggs@gmail.com</a>&gt;</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;">

(Preamble: I have lurked here without really paying attention much for a year+ now. I thought I&#39;d try to reinvolve myself. The following discussions are some of my favorite/funnest).<br>
<br>
I was looking at someone&#39;s ruby/regex code. I could do the equivalent of what they were doing with the ST Regex library. But I was curious if it could be done tersely/elegantly without using regex. Here&#39;s the challenge.<br>


<br>
Given strings of the form<br>
<br>
&#39;This is a (string) with some (parenthetical fields)&#39;<br>
<br>
turn them into<br>
<br>
&#39;This is a (STRING) with some (PARENTHETICAL FIELDS)&#39;<br></blockquote><div><br></div><div>In one line: </div><div><br></div><div>&#39;This is a (string) with some (parenthetical fields)&#39; withParentheticalFieldsCapitalized</div>

<div><br></div><div>...and then in the implementation of #withParentheticalFieldsCapitalized, take all the space you need to make it nicely readable and fast.</div><div><br></div><div>;)</div><div><br></div><div>- Stephen</div>

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