2 Replies Latest reply on Dec 4, 2011 6:38 AM by Haakenlid

    [CS 5.5/JS/OSX] Simple regular expression crashes InDesign

    Haakenlid Level 3

      I'm in the process of migrating a script from CS3 to CS5.5. When trying the script with no modifications it causes InDesign to stall, and I have to force close it. After running through the script line by line I found the culprit:

       

      /A(_|-)?B\.jpg/.test("A-C.jpg")
      

       

      This causes the entire script engine to freeze.

      With CS3 it works fine. Also when do I slight change it works fine:

       

      /A(-|_)?B\.jpg/.test("A-C.jpg")
      

       

      Any idea what's going on? Is it a bug in the scripting engine?