I have some data (E.g.: 'acs24','45','ds' etc). Using this data I have the following method
function formatData(data) {
    var rege = /^([A-Za-z0-9_\-\.])$/;
    if ( rege.test(data) ) {
        alert('Alpaha Numeric data');
    }
}
But this is not working. What is wrong with this function?
 
     
     
     
     
     
    