I had to translate the following if statement in to a regex so we could use it on a whole string
if (buffer[i] < 32 && !(buffer[i] == '\t' || buffer[i] == '\r' || buffer[i] == '\n'))
buffer[i] = ' ';
Which I did by doing this
return Regex.Replace(base.ReadLine(), "[\0-\x08\x0B\x0C\x0E-\x1F]", " ");
However I don't like the way it looks, is there a way in regex to do the same thing I did in the if statement? Basicly
[\0-\x1f]~[\t\r\b]
Where the ~
would go the thing that represents "exclude the following" (It does not have to be this exact syntax, I was just wondering if there is something like this?)