I have got a string ["foo","bar","buzz"] from view, i want to remove [,"&,]
I have used string x = tags.Trim(new Char[] { '[', '"', ']' }); but the output i got is foo","bar","buzz instead of foo,bar,buzz

I have tried Trimming & this but still having problem.
As alternative, you can use a "simple" Replace
string x = tags.Replace("[","")
.Replace("\"","")
.Replace("]","");
It isn't fast, but it's simple.
If you need more performance you should use an alternative.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With