(?:\x8e[\xa6-\xdf])  
^[ァ-ヴ!ー]+$以上两个是我在网上找的验证半角片假名的正则表达式,都不管用。其中第二个是验证全角片假名(有效)
我是日文白痴,请大家帮我把第二个表达式改下,改为验证【半角片假名】。谢谢

解决方案 »

  1.   

    一楼的很详细,但没用啊,大哥。
    EUC半角片假名 
    (?:\x8e[\xa6-\xdf])  
    这个根本没用,不过还是要谢谢。
      

  2.   

    public static bool IsHalfWidthKatakana(string strHalfWidthKatakana)
    { return FormatCheck(strHalfWidthKatakana,@"^[\uff66-\uff9f]*[0-9]*[\-+*/_]*$"); }private static bool FormatCheck(string strValue,string strRegex)
    {
    bool isReturnValue=false;
    if(!IsCharactersEmpty(strValue))
    {
    Regex regex=new Regex(strRegex);
    if(regex.IsMatch(strValue))
    {
    isReturnValue=true;
    }
    }
    return isReturnValue;
    }