3 Replies Latest reply on Sep 16, 2014 6:30 AM by bobsteamer

    Correct way to search for character within a string

    bobsteamer Level 1

      I am trying to search for the occurrence of a "(" within a text string - unfortunately my code is reported as incorrect.


      I extract the text correctly but cannot create the search statement correctly:


      var mylistpgftext = pgf.GetText (Constants.FTI_String)   

      for (var i=0; i < mylistpgftext.length; i++)             


          var mylistitem = mylistpgftext[i].sdata              

          var mybracketpos = mylistitem.search(/(/i)    --------------error line-----------------       

          if (mybracketpos != -1)