I need a regex for c# and js which would allow only these characters within a string, other than those characters should be ignored.
Capital alphabets
Small alphabets
Numbers
Dot
Dash
Ampersand
Forward slash
Your solution is not working. It is allowing all the characters :
123!@@#)(*@!#)&$@!*)
It shouldnt do like that.
Only :
White spaces
is allowed
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.