Proper regex formation