<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>InfoSauce: Category Ruby</title>
  <id>tag:blog.infosauce.com,2005:Typo</id>
  <generator uri="http://www.typosphere.org" version="4.0">Typo</generator>
  <link href="http://blog.infosauce.com/xml/atom/category/ruby/feed.xml" rel="self" type="application/atom+xml"/>
  <link href="http://blog.infosauce.com/articles/category/ruby" rel="alternate" type="text/html"/>
  <updated>2006-10-26T21:41:16-07:00</updated>
  <entry>
    <author>
      <name>Tieg Zaharia</name>
    </author>
    <id>urn:uuid:16244861-2b0a-48d0-97a9-2aae95529195</id>
    <published>2006-02-01T23:49:00-08:00</published>
    <updated>2006-10-26T21:41:16-07:00</updated>
    <title type="html">Ruby Conveniences</title>
    <link href="http://blog.infosauce.com/articles/2006/02/01/ruby-conveniences" rel="alternate" type="text/html"/>
    <category term="ruby" scheme="http://blog.infosauce.com/articles/category/ruby" label="Ruby"/>
    <summary type="html">&lt;p&gt;Unbeknownst to me, there�s a quick way of doing a match &amp;amp; replace on a string in Ruby using just the brackets: (page 588 in the Ruby Book)&lt;/p&gt;

&lt;code style="font-size: 12px;"&gt;a = "bla bla bla"&lt;/code&gt;&lt;br&gt;
&lt;code style="font-size: 12px;"&gt;a[/a/i]="A"&lt;/code&gt;&lt;br&gt;
&lt;code style="font-size: 12px;"&gt;a =&amp;amp;gt; "blA bla bla"&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
Unfortunately it only does one replace instead of a global replace, but I don�t know enough about RegExp�s now to know if there�s a way to do a global replace with this?</summary>
    <content type="html">&lt;p&gt;Unbeknownst to me, there�s a quick way of doing a match &amp;amp; replace on a string in Ruby using just the brackets: (page 588 in the Ruby Book)&lt;/p&gt;

&lt;code style="font-size: 12px;"&gt;a = "bla bla bla"&lt;/code&gt;&lt;br&gt;
&lt;code style="font-size: 12px;"&gt;a[/a/i]="A"&lt;/code&gt;&lt;br&gt;
&lt;code style="font-size: 12px;"&gt;a =&amp;amp;gt; "blA bla bla"&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
Unfortunately it only does one replace instead of a global replace, but I don�t know enough about RegExp�s now to know if there�s a way to do a global replace with this?
</content>
  </entry>
</feed>
