c# - Remove the space between single characters only -
i have following string , i'm trying remove space between only single characters, leaving words spaced.
example string
this s e n t e n c e.
the result needs be:
this sentence.
another example of:
words must remain spaced **s n g l e** characters **l k e** joined.
would become:
words must remain spaced **single** characters **like** joined.
res = regex.replace(s, @"(?<=\b\w)\s(?=\w\b)", "");
Comments
Post a Comment