0 Replies Latest reply on Feb 3, 2020 10:24 AM by Stephen Thompson

    Difference in Script RegEx result between v11 and v12

    Stephen Thompson

      Following an upgrade from v11 to v12 of EDQ we are seeing different behaviour in the Script processor between the versions.  This was highlighted in a flipped result of a particular test case.  We have found a workaround but for completeness we would like to understand the differences between the versions if possible.  The RegEx checks for the presence of more than one word and we use it for Arabic strings.  The JavaScript in the comparison is as below:

       

      output1 = null;
      
      if ((input1 != null) && (input1.length > 0)) {
      var str = new String(input1);
      var re = /\b(\w+?)\b/g;
      
       var match = str.match(re);
      if (match != null)
        if (match.length > 1)
         output1 = "Y";
      }
      

       

      Using input:  عبد الغني

       

      EDQ v11 returns  Y

      EDQ v12 returns NULL

       

      The match method in line 7 appears to be returning null.

       

      Many thanks

      Stephen