title: Check if there is special character and symbol inside a sentence using regex
body: <p>I wanna check if there is special character in a line inside a text file using Regex in shell script.
  assume there is sentence "assccÑasas"
  how to check if there is 'Ñ' inside the line, so it should be output as error instead.
  I also wanna check if there is symbol such as '/' or '^' or '&amp;', etc </p>
  
  <p>my code : </p>
  
  <pre><code>VALID='^[a-zA-Z_0-9&amp;.&lt;&gt;/|\-]+$' #myregex
  
  checkError(){
      if [[ $line =~ $VALID ]]; then
         echo "tes"
      else
          echo "not okay"
         exit 1
      fi
   }
  
   while read line
   do 
      checkRusak      
   done &lt; $1
  </code></pre>
  
  <p>so the example like if there is sentence "StÀck Overflow;" then it will output error. if there is sentence "stack overflow;" still output error.
  but if only "stack overflow" (no symbol or special character), it will output "test"</p>
  
  <p>so far it can check for symbol ('/' or '\' etc) but still problem in special character.</p>
  
  <p>Any help really appreciated, 
  thank you in advance </p>