eliminate repetitious message(perl)
control+c and then control+v seems very easy for people leaving repetitious message or word when post their message in guestbook
so,
can any one tell me how to get rid of message appearing one more times(in perl) or suggest me a free script that I can learn from it..
Thanks...
Patrick A Baer posted this at 23:27 — 4th March 2002.
He has: 32 posts
Joined: Mar 1999
You might try to log your messages to a logfile and compare a new message against this file.
Wil posted this at 09:47 — 5th March 2002.
They have: 601 posts
Joined: Nov 2001
You could do this in Perl quite easily.
$string =~ s/\b(\S+)\b(\s+\1\b)+/$1/
uatt posted this at 10:50 — 5th March 2002.
They have: 27 posts
Joined: Jan 2002
Thanks....
Seemingly, I have seen the method from a book but I cannot remember it ...
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.