[PHP] Sanitizing Numbers

2009-03-13 Thread Matt Neimeyer
I'm trying to sanitize some numeric data that's coming to us from another system which I have no control over where all fields are character fields with no formatting from the end user so data is a mishmash of clean and mixed types of dirty. I know I can use intval and floatval to sanitize if the

Re: [PHP] Sanitizing Numbers

2009-03-13 Thread haliphax
On Fri, Mar 13, 2009 at 12:34 PM, Matt Neimeyer m...@neimeyer.org wrote: I'm trying to sanitize some numeric data that's coming to us from another system which I have no control over where all fields are character fields with no formatting from the end user so data is a mishmash of clean and

Re: [PHP] Sanitizing Numbers

2009-03-13 Thread Richard Heyes
ereg [Gasps and runs off shouting PCRE] ... -- Richard Heyes HTML5 Canvas graphing for Firefox, Chrome, Opera and Safari: http://www.rgraph.net (Updated February 28th) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Sanitizing Numbers

2009-03-13 Thread haliphax
On Fri, Mar 13, 2009 at 2:09 PM, Richard Heyes rich...@php.net wrote: ereg [Gasps and runs off shouting PCRE] ... -- Richard Heyes HTML5 Canvas graphing for Firefox, Chrome, Opera and Safari: http://www.rgraph.net (Updated February 28th) You can bet your shirt my tests were using

Re: [PHP] Sanitizing Numbers

2009-03-13 Thread Robert Cummings
On Fri, 2009-03-13 at 19:09 +, Richard Heyes wrote: ereg [Gasps and runs off shouting PCRE] ... You know... Until somewhat recently I preferred POSIX over PCRE... rationale being it's POSIX that's a standard!!! But recently I came across some legacy code in a site I maintain that was

Re: [PHP] Sanitizing Numbers

2009-03-13 Thread Robert Cummings
On Fri, 2009-03-13 at 15:45 -0400, Robert Cummings wrote: On Fri, 2009-03-13 at 19:09 +, Richard Heyes wrote: ereg [Gasps and runs off shouting PCRE] ... You know... Until somewhat recently I preferred POSIX over PCRE... rationale being it's POSIX that's a standard!!! But recently