title: Regex to only let two words: either male or female
body: <p>I need to let through into SQL query only two words: either <em>male</em> or <em>female</em></p>
  
  <p>I use PHP function that returns:</p>
  
  <pre><code>return preg_replace( "/([male|female])/i", '', $data );
  </code></pre>
  
  <p>At the moment it removes these words but how do I delete absolutely everything and let only
  <br> either <em>male</em> or <em>female</em>?</p>
  
  <p>What am I missing here?</p>