Answer the question
In order to leave comments, you need to log in
How to remove line break character \n in regular expressions?
There is a function that replaces the content in a tag with other content.
But if there is a line break character \n in the content, then the function stops working.
public static string zamLang (string str, string id) {
string returnString = Regex.Replace(str, "(?<=<size>).*?(?=</size>)", Lang.lang(id));
return returnString;
}
string str = "Первая строка \n Вторая строка"
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question