Re: a little PHP reg exp help pls

2001-03-27 Thread Alson van der Meulen
On Mon, Mar 26, 2001 at 08:07:45PM -0800, Chad A. Adlawan wrote: hi! i would like to search out all non-numeric characters in my string and replace them with nothing in PHP. i tried preg_replace([^0-9],,$my_string); use strtr in this case, for preg_replace, you should use '/[^0-9]/' use

Re: a little PHP reg exp help pls

2001-03-27 Thread Marcel Hicking
preg_replace(/[^0-9]/,,$my_string); Since this is a Perl comaptible reg ex, you need the delimiters around the expression (slashes) Cheers, Marcel Chad A. Adlawan [EMAIL PROTECTED] 26 Mar 2001, at 20:07: hi! i would like to search out all non-numeric characters in my string and replace

a little PHP reg exp help pls

2001-03-26 Thread Chad A. Adlawan
hi! i would like to search out all non-numeric characters in my string and replace them with nothing in PHP. i tried preg_replace("[^0-9]","",$my_string); but, i get this error: Warning: No ending delimiter found in /var/www/html/mm/tmp2.php3 on line x can somebody help me do this correctly

Re: a little PHP reg exp help pls

2001-03-26 Thread Alson van der Meulen
On Mon, Mar 26, 2001 at 08:07:45PM -0800, Chad A. Adlawan wrote: hi! i would like to search out all non-numeric characters in my string and replace them with nothing in PHP. i tried preg_replace("[^0-9]","",$my_string); use strtr in this case, for preg_replace, you should use '/[^0-9]/'

a little PHP reg exp help pls

2001-03-26 Thread Chad A. Adlawan
hi! i would like to search out all non-numeric characters in my string and replace them with nothing in PHP. i tried preg_replace([^0-9],,$my_string); but, i get this error: Warning: No ending delimiter found in /var/www/html/mm/tmp2.php3 on line x can somebody help me do this correctly pls?