2 Replies Latest reply on Mar 27, 2008 4:38 AM by cweger79

    RegExp class elements

    cweger79 Level 1
      Hi all,
      Consider this code fragment:

      var r = new RegExp("cde");
      var result = r.exec("abcdefg");

      The "result" variable comes out as "cde" which is as it should.
      However the "rightContext" comes out as undefined. Same for leftContext and lastMatch.

      Shouldn't these have been set as part of the exec? What am I missing here?