title: How to use "scanf" to input specific letter?
body: <p>from my knowledge in high school.</p>
  
  <pre><code>scanf("%[^A-Z]s", input);
  </code></pre>
  
  <p>it is mean input can be any characters but except capital letter.</p>
  
  <p>but in case of i want to receive input only character [A-F] how can i do it?</p>
  
  <p>in my sense it should be written like this:</p>
  
  <pre><code>scanf("%[A-Z]s", input);
  </code></pre>
  
  <p>It looks like you use regex but anyway it was't work</p>
  
  <p>So, when i run it</p>
  
  <pre><code>$./a.out 
  asdfasdfABC 
  `[]@
  </code></pre>
  
  <p>[] is some alien character but i can not type.</p>