4 Replies Latest reply on Jul 30, 2010 7:01 AM by Muppet Mark-QAl63s

    RegExp help

    Mahesh_JW

      Hi All,

       


      var linkname = "0012.picture.eps";
      var FLG;
      var art_extn = ["psd","tif","eps","jpg","ai","pdf"];

       

      FLG = 0;
      for(var a=0;a<art_extn.length;a++){
         
          var patt = /\."+art_extn[a]+"$/i;
          alert(art_extn[a]+"\n\n"+patt);
          if(linkname.match(patt) != null){
              alert("match");
              FLG = 1;
          }
      }

       

      if(FLG == 0){
          alert("not matched");
      }

       

      i got not matched what can i do please help me.

       

      Thanks in advance