in reply to Re: [Class Assignment] Regex and Output Files
in thread [Class Assignment] Regex and Output Files

Yes, don't make this clbuttic mistake!

  • Comment on Re^2: [Class Assignment] Regex and Output Files

Replies are listed 'Best First'.
Re^3: [Class Assignment] Regex and Output Files
by Anonymous Monk on Feb 20, 2015 at 18:21 UTC

    Wow, tough crowd for a Friday afternoon. From http://www.computerhope.com/jargon/c/clbuttic.htm:

    More commonly known as the Scunthorpe problem, clbuttic is an issue that occurs with filters such as spam filters that mistakenly blocks or denies something that is valid. The Scunthorpe problem derives from the swearword filter AOL was using in 1996 that blocked valid users who were living in this town from creating accounts from the obscene keyword found within this towns name.

    There's even a Wikipedia article.

    Telegraph article: http://www.telegraph.co.uk/news/newstopics/howaboutthat/2667634/The-Clbuttic-Mistake-When-obscenity-filters-go-wrong.html

    Blog with more references that also mentions \b: http://blog.codinghorror.com/obscenity-filters-bad-idea-or-incredibly-intercoursing-bad-idea/

      Digital transcripts regarding the plight of a certain hammer wielding Aasgardian in this matter are also deemed of historical interest.

      A substitution of a word in a file can be conducted from the command line. Optional backup can be output with a suffix of your choosing, placed after the -i flag.

      Easy as

      %> perl -pi -e "s/\bnew\b/old/ig;" .\newfile.txt

      for a backup copy, place in a preheated oven

      %> perl -pi.bak -e "s/\bnew\b/old/ig;" .\newfile.txt