It looks like the new version of OSX no longer supports grep -P and as such has made some of my scripts stop working.
var1=`grep -o -P '(?<=<st:italic>).*(?=</italic>)' file.txt`
I need to capture the grep to a variable and I need to use the zero width assertions, as well as \K
var2=`grep -P -o '(property:)\K.*\d+(?=end)' file.txt`
Any alternatives would be greatly appreciated.