Regex menghapus duplikat

var regex = new RegExp("^(?!.*?[._]{2})[a-zA-Z0-9_.]+$");
Fragile Fox