Purely out of curiosity, is there a more elegant way to simply get the substring after the first = symbol in a string? The following works to give back name=b
=
name=b
Probably not the Ruby-way (it's a bit cryptic), but you could do this:
string[/=/] $' => "name=bob"
or
/=/ =~ string $' => "name=bob"
$' is a global holding the string after a successful match. It's nil if nothing is matched, too!
$'
nil