0
我有一個很長的字符串,當我找到由0x0d 0x0a 0x20
組成的三個字符的序列時,我將用0x5c 0x6e 0x20
替換這三個字符。 問題是我在0x0d 0x0a 0x20
之後的第一個if子句中沒有找到匹配項。所以你需要將其分配到新的或相同如何替換這個字符序列
if (allText.IndexOf(@"\r\n ") != -1)
{
allText = Regex.Replace(allText, @"\r\n ", @"\n ");
if (allText.IndexOf(@"\n ") != -1)
{
}
}
//託尼
什麼是allText? –
這只是很多文字 – tony
它是否包含@「\ r \ n」...如果是的話,它應該通過第一個條件 –