Panda,
Can I suggest that you read Michael Ash's blog entry at http://regexadvice.com/blogs/mash/archive/2008/01/31/A-touch-of-Character-Class.aspx where you can learn hoe to use character set definitions correctly.
For example, while not exactly wrong, '[\W]' can be written as '\W'. Also '[!\s]' creates a character set that contains all of the space characters and the exclamation point. I think you want to create a character set that contains all of the characters except those you specify - the correct syntax for that is '[^\s]' with the '^' character as the first inside the set definition. In fact, this set can equally be specified as '\S'.
By the way, the keyword for you in "IgnorePatternWhitespace" is the "Pattern" - this allows you to put whitespace (and comments, line breaks etc) inside your pattern to make it more readable. It has NOTHING to do with the way the regex engine processes whitespace within the string it is scanning, which seems to be your intent in specifying this option.
To remove all non-alphanumeric characters but leave the whitespace characters, you can use a special pattern syntax capability that the .NET regex has by using the pattern:
[\W-[\s]]
[Note that the square brackets around the '[\s]' alters the "normal" meaning of the '-' character within a character set from specifying a range (as in '[a-e] being the first 5 characters lower case alphabetic characters) to being a character set "subtraction" - as far as I know this is specific to the .NET regex pattern syntax]
This takes the test string:
I need to {6^&*$^* put the - Char where .' there !"$£ is a space
and with a null replacement string, the replace function outputs:
I need to 6 put the Char where there is a space
By the way, if we take your pattern '[!\s]|[\W]', correct the syntax to '[^\s]|[\W]' and simplify it to '\S|\w', what this says is that it will match all non-space characters OR all alphanumeric (and underscore) characters. Now the '\w' set is a subset of '\S' so any character that doesn't match the '\S' will also not match the '\w'. Conversely, any character that could match the '\w' will also match the '\S' and so it will never be tested by the '\w'. In effect, your pattern is '\S' which is why the punctuation characters come through.
However, going back to the original problem statement, we want to match any character that is NOT alphabetic and NOT whitespace. Turning the problem on its head, we can say we want to locate any character that is alphabetic or a whitespace and leave it alone. To do this, the pattern:
[\w\s]
will match any alphabetic or whitespace character. In reality we want to match exactly the opposite set of characters so we can use:
[^\w\s]
If you use there null replacement string in a replace() operation, you end up with exactly the same as above. This is a simpler representation than above and will work on just about any regex variant.
Susan