<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: numeric code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Thu, 21 Aug 2008 15:51:30 GMT</pubDate>
    <description>DZone Snippets: numeric code</description>
    <item>
      <title>Using Regular Expressions to validate a fixed length numerical string.</title>
      <link>http://snippets.dzone.com/posts/show/4627</link>
      <description>Using Ruby and Regular Sxpressions, this code successfully validates a string if it contains exactly 3 numbers.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;a = '547'&lt;br /&gt;/^\d\d\d$/ ~= a&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Tue, 09 Oct 2007 11:55:10 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/4627</guid>
      <author>jrobertson (James Robertson)</author>
    </item>
    <item>
      <title>Using Regular Expressions to validate a numerical string.</title>
      <link>http://snippets.dzone.com/posts/show/4626</link>
      <description>Using Ruby and Regular Expressions, this code validates a string for numbers only. If the string variable contains only numbers then 0 will be returned otherwise nil.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;a = '134323'&lt;br /&gt;/^[0-9]*$/ =~ a&lt;br /&gt;#result returns 0, indicating success&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Tue, 09 Oct 2007 11:45:13 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/4626</guid>
      <author>jrobertson (James Robertson)</author>
    </item>
  </channel>
</rss>
