[PHP] Re: one pattern, one string, multiple results

2001-09-26 Thread _lallous
use this modifier /ies instead of /ie "_lallous" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > try this! > I don't know how effective is preg_replace w/ huge memory contentsbut > this should work fine! > > $mem = "an arc is an archer, arc but what about

[PHP] Re: one pattern, one string, multiple results

2001-09-26 Thread _lallous
try this! I don't know how effective is preg_replace w/ huge memory contentsbut this should work fine! $mem = "an arc is an archer, arc but what about marc and darcy?"; $match = "arc"; $count = 0; preg_replace("/\b$match\b/ie", "\$count++;", $mem); echo $count; "Richard Baskett" <[