RE: [PHP] Re: Ereg problems

2004-03-26 Thread Jeff McKeon
-Original Message- From: Curt Zirzow [mailto:[EMAIL PROTECTED] Sent: Thursday, March 25, 2004 6:55 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: Ereg problems On Thu, 25 Mar 2004 18:31:02 -0500, Jeff McKeon [EMAIL PROTECTED] wrote: Having some problems with ereg

Re: [PHP] Re: Ereg problems

2004-03-26 Thread Curt Zirzow
* Thus wrote Jeff McKeon ([EMAIL PROTECTED]): preg_match_all('($-?[0-9]+\.[0-9]+)', $string, $found); print_r($found); That produces: Array ( [0] = Array ( ) ) 0 , Array Sorry that should be: preg_match_all('/(\$-?[0-9]+\.[0-9]+)/', $string, $found); Curt -- I used to

[PHP] Re: Ereg problems

2004-03-25 Thread Curt Zirzow
On Thu, 25 Mar 2004 18:31:02 -0500, Jeff McKeon [EMAIL PROTECTED] wrote: Having some problems with ereg() [begin code] $string=Credit adjusted: $-1.32 to $48.68 ereg(([\\$(\\$-)][0-9]+\.[0-9]+),$data[2],$found); While(list($index,$hits)=each($found)) {