Re: [PHP] Help w/ regular expressions for banned words

2001-01-20 Thread Team JUMP
ntax is right. Thanks for your help, though. --Neal --- did it work? - Original Message - From: Team JUMP <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, January 20, 2001 12:35 PM Subject: Re: [PHP] Help w/ regular expressions for banned words T

Re: [PHP] Help w/ regular expressions for banned words

2001-01-20 Thread Romulo Roberto Pereira
ng.""; // test the end word and exchange reset($bannedwords); foreach ($bannedwords as $word) { $string = eregi_replace("{$word}$","[censored]",$string); } echo $string.""; echo $dot.""; echo $hasdot; ?> - Original Message - From: Team

Re: [PHP] Help w/ regular expressions for banned words

2001-01-20 Thread Team JUMP
Thanks for your help. Unfortunately, [:space:]$bannedwords[$i][:space:] would not work, since I need to also check for the first and last word. In a last-case scenario I could write special code for the first and last word, but that may get ugly with bug-checking... but I've already tried "\s+$b

Re: [PHP] Help w/ regular expressions for banned words

2001-01-20 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Team JUMP) wrote: >$num=count($bannedwords); > for($i=0;$i<$num-1;$i++) > { > $string = > eregi_replace("\b$bannedwords[$i]\b","[censored]",$string); > } > > > For whatever reason, no wor

[PHP] Help w/ regular expressions for banned words

2001-01-20 Thread Team JUMP
$num=count($bannedwords); for($i=0;$i<$num-1;$i++) { $string = eregi_replace("\b$bannedwords[$i]\b","[censored]",$string); } For whatever reason, no word in $bannedwords will match in the string. I've tested it with simple expressions like