title: How to grab last character in a regex with grep
body: <p>I'm trying to grab the last space and what follows it on a line using grep.</p>
  
  <p>This grab me the first space :</p>
  
  <pre><code>echo "toto tata titi" | grep -o " .*$"
  </code></pre>
  
  <p>In Java I would have used the non-greedy operator but it does not seem to work :</p>
  
  <pre><code>echo "toto tata titi" | grep -o " .*?$"
  </code></pre>
  
  <p>It return nothing</p>
  
  <p>The expected result is <code>titi</code>.</p>