title: grep -P no longer works. How can I rewrite my searches?
body: <p>It looks like the new version of OS X no longer supports <code>grep -P</code> and as such has made some of my scripts stop working, for example:</p>
  <pre><code>var1=`grep -o -P '(?&lt;=&lt;st:italic&gt;).*(?=&lt;/italic&gt;)' file.txt`
  </code></pre>
  <p>I need to capture grep's result to a variable and I need to use zero-width assertions, as well as <code>\K</code>:</p>
  <pre><code>var2=`grep -P -o '(property:)\K.*\d+(?=end)' file.txt`
  </code></pre>
  <p>Any alternatives would be greatly appreciated.</p>