[there are similar questions but none is giving a valid answer for my needs]
I allow user to input text matching this regex :
string validChars = @"^[A-Za-zÀ-ÖØ-öø-ÿ0-9\s\.\-\&\,\'\(\)_\/\""\!\:\%]*?$";
what I want to do is to remove characters that do NOT match that regex
how can I INVERT the regex so I can do
invalidChars = some_trick_to_invert_regex(validChars);
text = Regex.Replace(text, invalidChars , "");
thanks for your help
string invalidChars = @"[^A-Za-zÀ-ÖØ-öø-ÿ0-9\s\.\-\&\,\'\(\)_\/\""\!\:\%]";?