in reply to Match first word in line fails
Update:#!/usr/bin/perl use strict; use warnings; my $badwords = join("|", @badwords); while (<$book>) { s/[\"'.,!?:;()[\]{}|\\\/-]/ /g; #replace all punctuation with a sp +ace s/\b($badwords)\b/replaceword($1)/eig; #replace all bad words, ign +ore case }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Match first word in line fails
by lidden (Curate) on Jan 30, 2005 at 05:10 UTC | |
|
Re^2: Match first word in line fails
by yacoubean (Scribe) on Jan 30, 2005 at 05:29 UTC |