Re: [PHP] Removing non-numbers

2005-02-15 Thread Richard Lynch
Ben Miller wrote: > OK - easy one here, I know. Having troubles removing anything that is not > a > number from user input. According to manual, [!] is supposed to mean set > of > non-matching optional characters. Tried ! means that, but only in a completely different context from what you are

Re: [PHP] Removing non-numbers

2005-02-14 Thread Greg Donald
On Mon, 14 Feb 2005 18:54:03 -0700, Ben Miller <[EMAIL PROTECTED]> wrote: > OK - easy one here, I know. Having troubles removing anything that is not a > number from user input. According to manual, [!] is supposed to mean set of > non-matching optional characters. $var = preg_replace( '/[^\d]/'