c# - How can Replace infinite loop? -
I am working on nothing but incompetent C # code which wants to remove the spaces, it does this:
Input from one place (for example) \ n \ n \ nThe input does not conflict, therefore a loop is required. I think this should work, and it usually does
but sometimes it manages to join an infinite loop, and I do not know how
< P> Any ideas?
Will this work:
string c = Regex Replace (b, "\ n \ n +", "\ n");
Comments
Post a Comment