<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1024952" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1024952</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/ereg-again-hate-these-things#comment-1152181</link>
    <description> &lt;p&gt;If I was a bank I&#039;d be very fussy lol&lt;/p&gt;
&lt;p&gt;I have a function to force it to a double (include cents value if none) before being inserted into database etc but for this part I don&#039;t really need it to validate it.&lt;/p&gt;
 </description>
     <pubDate>Thu, 27 May 2004 04:45:17 +0000</pubDate>
 <dc:creator>Busy</dc:creator>
 <guid isPermaLink="false">comment 1152181 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/ereg-again-hate-these-things#comment-1152172</link>
    <description> &lt;p&gt;Most banks here reject everything that isn&#039;t in the right format. You&#039;re being very generous to your users!&lt;/p&gt;
 </description>
     <pubDate>Thu, 27 May 2004 00:43:16 +0000</pubDate>
 <dc:creator>Suzanne</dc:creator>
 <guid isPermaLink="false">comment 1152172 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/ereg-again-hate-these-things#comment-1152171</link>
    <description> &lt;p&gt;Everything that comes from a form gets trimmed, stripped and slashes added first&lt;/p&gt;
&lt;p&gt;I got the second ereg example from (php.net), it works on 12000.00 value but not 12000&lt;/p&gt;
&lt;p&gt;**long pause**&lt;/p&gt;
&lt;p&gt;By crikey I think I&#039;ve got it,&lt;br /&gt;
if(!ereg(&quot;^[0-9]+|[0-9]{1,3}(\.[0-9]{0,2})?$&quot;,$amount)) seems to work&lt;/p&gt;
&lt;p&gt;It&#039;s a bit hard to test properly as I have so many restrictions on everything else, but that with is_numeric() seems to catch everything, wooohooooo&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Problem with the code above is it will allow values like 1abcdef2, is_numeric() seems to allow multi commas but only one full stop which is great as it allows millions and cents.&lt;/p&gt;
 </description>
     <pubDate>Wed, 26 May 2004 23:59:12 +0000</pubDate>
 <dc:creator>Busy</dc:creator>
 <guid isPermaLink="false">comment 1152171 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/ereg-again-hate-these-things#comment-1152144</link>
    <description> &lt;p&gt;&lt;a href=&quot;http://www.php.net/ereg&quot; class=&quot;bb-url&quot;&gt;http://www.php.net/ereg&lt;/a&gt; has the following, which is what you have, right?&lt;/p&gt;
&lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;Quote:&lt;br /&gt;
Money&lt;br /&gt;
eregi(&#039;^[1-9]{1}[0-9]*[.]{1}[0-9]{2}$&#039;,$price)
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;The only difference is the single quotes v. double quotes.&lt;/p&gt;
&lt;p&gt;Are you stripping, trimming, et cetera as well?&lt;/p&gt;
 </description>
     <pubDate>Wed, 26 May 2004 13:51:27 +0000</pubDate>
 <dc:creator>Suzanne</dc:creator>
 <guid isPermaLink="false">comment 1152144 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
