title: Delete multiple element from PHP with non strict criterias
body: <p>I have an array which is created from <code>readdir</code> function, let's say like this one:</p>
  
  <p><code>$array = array("file1.txt","file2.txt","file3.txt","~file1.txt","~file3.txt")</code></p>
  
  <p>I don't know exact name of the files which have <code>~</code> character. I want to exclude all values which have <code>~</code> so the array should be:</p>
  
  <p><code>$array = array("file1.txt","file2.txt","file3.txt")</code></p>
  
  <p>Can you tell me, how can I do that in PHP?</p>