I just posted a similar answer in response to another thread, but on
this one I'm with Robert. Regex can present maintenance roadblocks
when they become numerous and multi-line long; but the string parsing
problem presented here is relatively simple and a textbook example of
when you SHOULD use a regex.

Best tool for the job and all that.

On Mon, Nov 24, 2014 at 1:18 PM, joe chesak <rubytalk / chesak.com> wrote:
> I usually get the same response Robert.  I see both sides.  I love regexp
> for it's surgical precision.  And once you get comfortable with the syntax,
> indeed why not just do the extraction in one step?
>
> But in practice I find that when I use regular expressions, then I have to
> maintain that code because the developers around me prefer not to use this
> power tool.  So I'd probably pick Agustus' solution too.
>
>
>
>
>
>
> On Mon, Nov 24, 2014 at 6:49 PM, Robert Klemme <shortcutter / googlemail.com>
> wrote:
>>
>> On Mon, Nov 24, 2014 at 5:58 PM, Brandon Weaver <keystonelemur / gmail.com>
>> wrote:
>> > There are times when regex is wrong. This is such a time.
>>
>> Why?
>>
>> --
>> [guy, jim].each {|him| remember.him do |as, often| as.you_can - without
>> end}
>> http://blog.rubybestpractices.com/
>
>