I am using RegularExpressionValidator in visual studio and I am struggling to create the correct regular expression for my needs. Here is what I want:
An input can contain any character except <>:"/|?*
In addition, an input cannot contain two backslashes in a string
So, it your\momwill be fine, but your\\momwill fail, as wellyour*mom
The closest I came to this question is something like
^(?=.*[^<>:"/|?*])(?:[^\\]+|\\(?:$|[^\\])).{0,100}$
but that will not work.
source
share