Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6211

Regex to accept only 7 types of special characters

$
0
0

In my react-native application, I have a requirement to accept 7 types of special characters in a string. It could be all 7, few of them or none of them.

Special characters are (),@'/-

so the accepted string will be like following.

  1. ABcd()ef,/'-@sdf => accepting all 7
  2. ABcd(), => accepting few of 7
  3. ABcddfg => accepting none of 7

How should I write this regex in java script?


Viewing all articles
Browse latest Browse all 6211

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>