Given a string like this:
Fixing this [HFW] takes alot of [HFW] time [HFW]
should be this:
[CW] [CW] [HFW] [CW] [CW] [CW] [HFW] [CW] [HFW]
I need to replace any word with [CW] except the tags [HFW].
I've been trying this alot, the best i got is:
regex = new Regex(@"[^(\[HFW\])_]+");
cleanText = regex.Replace(cleanText, " [CW] ");
Which almost works, but i get the first capital F left out, being a part of [HFW] tag. I mean, it won't take [HFW] as a group.
Thank you