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
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
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
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
4 matches
Mail list logo