• + 0 comments
        switch(true){
         case regex1.test(s):
           letter="A";
           break;
         case regex2.test(s):
           letter="B";
           break;
         case regex3.test(s):
           letter="C";
           break;
         case regex4.test(s):
           letter="D";
           break;  
     }