Reputation: 13338
I'am trying to filter a string with Regex.Replace, but I'am stuck on Replacing text like this: [02] or [06].
The code I'am using now is:
string cleanData = Regex.Replace(stringtext, "[..]", "");
Does anybody have any ideas?
Upvotes: 1
Views: 82
Reputation: 15357
Use
string cleanData = Regex.Replace(stringtext, @"\[..\]", "");
(cannot test it).
Upvotes: 1