[PHP] Regexp (ereg) help

2003-07-24 Thread Reuben D. Budiardja
Hi all, If I have the following string: $str = This is a %ANS[1] test, and %ANS[2] test, and %ANS[10], test and want to use ereg($pattern, $str, $regs); what is the $pattern should be so that in $regs I have $regs[1] == %ANS[1]; $regs[2] == %ANS[2]; $regs[3] == %ANS[10]; ... In fact, the

Re: [PHP] Regexp (ereg) help

2003-07-24 Thread Curt Zirzow
* Thus wrote Reuben D. Budiardja ([EMAIL PROTECTED]): Hi all, If I have the following string: $str = This is a %ANS[1] test, and %ANS[2] test, and %ANS[10], test and want to use ereg($pattern, $str, $regs); what is the $pattern should be so that in $regs I have $regs[1] == %ANS[1];