<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>hi, it&#39;s mike</title>
    <link>https://mike.puddingtime.org/tags/regex/</link>
    <description>Recent content on hi, it&#39;s mike</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <managingEditor>mike@puddingtime.org (mike)</managingEditor>
    <webMaster>mike@puddingtime.org (mike)</webMaster>
    <copyright>© 2026, mike</copyright>
    <lastBuildDate>Mon, 19 Apr 2010 23:53:27 +0000</lastBuildDate>
    <atom:link href="https://mike.puddingtime.org/tags/regex/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Live and Learn</title>
      <link>https://mike.puddingtime.org/posts/2010-04-19-live-and-learn/</link>
      <pubDate>Mon, 19 Apr 2010 23:53:27 +0000</pubDate><author>mike@puddingtime.org (mike)</author>
      <guid>https://mike.puddingtime.org/posts/2010-04-19-live-and-learn/</guid>
      
      <description>Well, from yesterday’s entry on Ruby and Joomla and such:
article_alias.gsub!(/\-{2,}/,&#34;-&#34;) First, I guess article_alias.gsub!(/\-+/,&#34;-&#34;) is less noisy by three characters. I don’t know how I got into the habit of using intervals instead of quantifiers, but it’s all over the place in my scripts. …</description>
      <content:encoded><![CDATA[<p>Well, from <a href="http://mph.puddingbowl.org/2010/04/from-legacy-cms-to-joomla-with-ruby/">yesterday&rsquo;s entry on Ruby and Joomla and such</a>:</p>
<pre><code>article_alias.gsub!(/\-{2,}/,&quot;-&quot;)
</code></pre>
<p>First, I guess <code>article_alias.gsub!(/\-+/,&quot;-&quot;)</code> is less noisy by three characters. I don&rsquo;t know how I got into the habit of using intervals instead of quantifiers, but it&rsquo;s all over the place in my scripts.</p>
<p>Second, just this morning, <a href="http://rubyquicktips.tumblr.com/post/533010887/ill-put-the-squeeze-on-ya">Ruby Quicktips pointed out the &ldquo;squeeze&rdquo; method</a>, which would work like this:</p>
<pre><code>article_alias.squeeze!(&quot;-&quot;)
</code></pre>
<p>Tidy!</p>
<p>#regex #ruby</p>
<p><em><a href="mailto:mike@puddingtime.org?subject=Re%3A%20Live%20and%20Learn">Drop a line about this</a>.</em></p>]]></content:encoded>
    </item>
    <item>
      <title>Rubular Regexp Tester/Editor</title>
      <link>https://mike.puddingtime.org/posts/2009-01-18-rubular-regexp-tester-editor/</link>
      <pubDate>Sun, 18 Jan 2009 04:02:42 +0000</pubDate><author>mike@puddingtime.org (mike)</author>
      <guid>https://mike.puddingtime.org/posts/2009-01-18-rubular-regexp-tester-editor/</guid>
      
      <description>Rubular is a handy tool for figuring out Ruby regexps. You type in your regexp in the top field, include your options in a second field, then enter a test string. It shows the match results dynamically as you enter or edit the regexp or test string.
You can get that far with the free (as in GPL’d, …</description>
      <content:encoded><![CDATA[<p><a href="http://www.rubular.com/" title="Rubular: a Ruby regular expression editor and tester">Rubular</a> is a handy tool for figuring out Ruby regexps.  You type in your regexp in the top field, include your options in a second field, then enter a test string. It shows the match results dynamically as you enter or edit the regexp or test string.</p>
<p>You can get that far with the free (as in GPL&rsquo;d, pedants) <a href="http://reggyapp.com/">Reggy</a> on the Mac.  Rubular also offers the ability to create permalinks of a regexp. Nice if you&rsquo;re the type to periodically help others out with regexps, since e-mail is suboptimal for <a href="http://codesnippets.joyent.com/posts/show/42">more elaborate examples</a>.</p>
<p>It also claims to save them to your clipboard, but that&rsquo;s a bit of functionality that didn&rsquo;t work for me.  Didn&rsquo;t feel like digging into it, so I don&rsquo;t know if it&rsquo;s because I haven&rsquo;t recently <a href="http://www.febooti.com/support/website-help/website-javascript-copy-clipboard.html">told Firefox to let me do that</a> or if the site is using a Flash-based copy-to-clipboard hack that&rsquo;s been caught up in the furor over everybody figuring out that <a href="http://www.securityfocus.com/bid/31117/discuss">it might be bad to let Flash just write stuff to your clipboard</a>.</p>
<p>Either way, nice reference.</p>
<p>#regexp #ruby</p>
<p><em><a href="mailto:mike@puddingtime.org?subject=Re%3A%20Rubular%20Regexp%20Tester%2FEditor">Drop a line about this</a>.</em></p>]]></content:encoded>
    </item>
  </channel>
</rss>
