The replacement could be done with a single replacement on `@"\\s+"`, or `@"[\\n\\t ]+"` if you prefer.