improve regexp for recognize macs