I need help with my App Scripts code that checks for sheet names. In my project, there are two types of sheet names - those with only alphabets (e.g. master) and those with a combination of alphabets and numbers (PHY4125). The current code is set to check for the second type of sheet name, but my IF condition isn't working as expected. Is there another approach I can take to achieve the same task?
Here is my code snippet:
function autoConvert(e) {
var ss = e.source;
var sh = ss.getActiveSheet();
var key = sh.getName();
var lastRow = sh.getLastRow();
if (key.match(/[0-9]/)) {
// Code block implementation
}
}