次のプログラムに問題がありますが、コンパイルが実行されますが、入力文字列が正しい形式でないと表示されます。誰でも助けてくれますか?C#正規表現の入力文字列の問題
string path = @"C:/Documents and Settings/expn261/Desktop/CharacterTest/Output.xls";
string strCharater = File.ReadAllText(path,UTF7Encoding.UTF7);
strCharater = Regex.Replace(strCharater, "[èéèëêð]", "e");
strCharater = Regex.Replace(strCharater, "[ÉÈËÊ]", "E");
strCharater = Regex.Replace(strCharater, "[àâä]", "a");
strCharater = Regex.Replace(strCharater, "[ÀÁÂÃÄÅ]", "A");
strCharater = Regex.Replace(strCharater, "[àáâãäå]", "a");
strCharater = Regex.Replace(strCharater, "[ÙÚÛÜ]", "U");
strCharater = Regex.Replace(strCharater, "[ùúûüµ]", "u");
strCharater = Regex.Replace(strCharater, "[òóôõöø]", "o");
strCharater = Regex.Replace(strCharater, "[ÒÓÔÕÖØ]", "O");
strCharater = Regex.Replace(strCharater, "[ìíîï]", "i");
strCharater = Regex.Replace(strCharater, "[ÌÍÎÏ]", "I");
strCharater = Regex.Replace(strCharater, "[š]", "s");
strCharater = Regex.Replace(strCharater, "[Š]", "S");
strCharater = Regex.Replace(strCharater, "[ñ]", "n");
strCharater = Regex.Replace(strCharater, "[Ñ]", "N");
strCharater = Regex.Replace(strCharater, "[ç]", "c");
strCharater = Regex.Replace(strCharater, "[Ç]", "C");
strCharater = Regex.Replace(strCharater, "[ÿ]", "y");
strCharater = Regex.Replace(strCharater, "[Ÿ]", "Y");
strCharater = Regex.Replace(strCharater, "[ž]", "z");
strCharater = Regex.Replace(strCharater, "[Ž]", "Z");
strCharater = Regex.Replace(strCharater, "[Ð]", "D");
strCharater = Regex.Replace(strCharater, "[œ]", "oe");
strCharater = Regex.Replace(strCharater, "[Œ]", "Oe");
strCharater = Regex.Replace(strCharater, "[«»\u201C\u201D\u201E\u201F\u2033\u2036]", "\"");
strCharater = Regex.Replace(strCharater, "[\u2026]", "...");
string path2 = (@"C:/Documents and Settings/expn261/My Documents/CharacterReplaceTest.csv");
StreamWriter sw = new StreamWriter(path2);
sw.WriteLine(strCharater, UTF7Encoding.UTF7);
どの文字列が表示されますか? – Edgar
質問の赤いスレッドは非常に興味深いですが、時折の正解を特に正しいものとしてマークすることを検討してください。答えを得るための明確で洗練された質問をする能力を持っていることを他のユーザーが助けてくれるよう奨励します。 –
十分な情報がない質問をして、それに応答しません。 -1 –