change regex matching to (hopefully) fix problem of special characters