title: Regex Only one special character at a time from allowed special characters Javascript
body: <p>I want to allow 3 characters 1st Underscore (_) , 2nd hyphen (-) 3rd Dot (.)</p>
  
  <p>but i want to put conditions that only one character is allowed at a time from all of them, and also only one time.
  <br>e.g<br>
  allowed usernames = abc.def , abc-def , abc_def<br>
  not allowed usernames = abc.de.f alert here(only one special character is allowed in a username)<br>
  not allowed usernames = abc.de-f , abc.de_f , ab-cd_ef</p>
  
  <p>What should i do.</p>