For example I have the following string:
thats a\n\ntest\nwith multiline \n\nthings...
I tried to use the following code which does not work correctly and still hasn't all chars included:
string text = "thats a\n\ntest\nwith multiline \n\nthings and so on";
var res = Regex.IsMatch(text, @"^([a-zA-Z0-9äöüÄÖÜß\-|()[\]/%'<>_?!=,*. ':;#+\\])+$");
Console.WriteLine(res);
I want the regex returning true when only
the following chars are included (do not have to contain all of them but at least one of the following and no others):
a-z
, A-Z
, 0-9
, äüöÄÖÜß
and !#'-.:,; ^"§$%&/()=?\}][{³²°*+~'_<>|
.
This is a list of known keyboard characters I thought of would be nice the use inside of a message.