Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-18982

RegExp.test() fails every other call when 'g' flag is enabled

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Adobe Flex SDK 3.2 (Release)
    • None
    • mx: General
    • None
    • Affected OS(s): Mac
      Affected OS(s): Mac OS 10.5
      Language Found: English

    Description

      <?xml version="1.0" encoding="utf-8"?>
      <mx:WindowedApplication creationComplete="run()" xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
      <mx:Script>
      <![CDATA[
      function run()

      { var r:RegExp = new RegExp("^match this$","ig"); trace("Matched first time: " + r.test("match this")); trace("Matched second time: " + r.test("match this")); //Returns false. This is not expected behavior for a .test() call }

      ]]
      >
      </mx:Script>
      </mx:WindowedApplication>

      Attachments

        Activity

          People

            Unassigned Unassigned
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: