I know that the regex class \D matches "all characters that are non-numeric" but I would like to match on all characters that are non-numeric and are not / or -
How might I do this? Thanks!
You already know how to find non-numeric characters with \D. You may lay a restriction on the \D to exclude / and - and any other non-numeric characters with a negative lookahead:
(?![\/-])\D
See regex proof.
EXPLANATION
--------------------------------------------------------------------------------
(?! look ahead to see if there is not:
--------------------------------------------------------------------------------
[\/-] any character of: '\/', '-'
--------------------------------------------------------------------------------
) end of look-ahead
--------------------------------------------------------------------------------
\D non-digits (all but 0-9)
[\\D&&[^/-]], in .NET[\D-[/-]].