I have some string. I need a regex that will replace each occurrence of symbol that is not space + '<'
with the same symbol + space + '<'
.
In other words if there is '<'
without ' '
before it it must add the space.
I've tried something like :
string pattern = "[^ ]<";
string replacement = "$0" + "<";
string result = Regex.Replace(html, pattern, replacement);
Obviously not working as I want.