>>169
正規表現のみは難しいんじゃないかな?
以下サイトに書いてあるよ。

Shift-JISテキストを正しく扱う
http://homepage1.nifty.com/nomenclator/perl/shiftjis.htm#fold