fix regex to work with max OS X