[PHP] Sigh....regex - need to search/replace string for anything but numbers

2005-01-25 Thread Matt Babineau
Ahh so the regex gods are pissed at me. This is simple (I think), but I need to figure out how to strip out everything in a string that is not a number. Any takers? Thanks, Matt Babineau Criticalcode w: http://www.criticalcode.com p: 858.733.0160 e: [EMAIL PROTECTED]

Re: [PHP] Sigh....regex - need to search/replace string for anything but numbers

2005-01-25 Thread Rick Fletcher
Matt Babineau wrote: Ahh so the regex gods are pissed at me. This is simple (I think), but I need to figure out how to strip out everything in a string that is not a number. Any takers? I appear to have written that last snippet without really even looking at it. This one works. ?php $string =

Re: [PHP] Sigh....regex - need to search/replace string for anything but numbers

2005-01-25 Thread Rick Fletcher
Matt Babineau wrote: Ahh so the regex gods are pissed at me. This is simple (I think), but I need to figure out how to strip out everything in a string that is not a number. Any takers? ?php $string = asd98.a98asd/7987asd; $numberless = preg_replace_all( /[^0-9]/, , $string ); ? -- PHP General