title: Filter a vector of strings based on string matching
body: <p>I have the following vector:</p>
  
  <pre><code>X &lt;- c("mama.log", "papa.log", "mimo.png", "mentor.log")
  </code></pre>
  
  <p>How do I retrieve another vector that only contains elements starting with "m" and ending with ".log"?</p>