grep -P doesn't seem to work on OSX mavericks so switched to -E