8 Replies Latest reply on Jul 17, 2014 8:36 PM by pixxxel schubser

    why do I get this result when I use split

    Dapeamel

      Hello guys

      I have created a script that looking for the active path,

       

       

      var myPath = (File($.fileName).parent.parent.parent.fullName);
      alert(myPath)
      
      

       

      I recieve "/xxxxx/xxxx/xxxx/341542"

       

      the only thing I am interested of in this information it's the number,

       

      so I added on the code

       

      var myPath = (File($.fileName).parent.parent.parent.fullName).split("xxxx/xxxx/xxxx/");
      
      

       

      the problem is

      I recieve ",341542"

       

      why do I recieve a comma before the number??

       

      there is no comma. in the path.