         };
     }
     
+    private function replaceString(matchedSubstring:String,
+                                   capturedMatch1:String, index:int, str:String,
+                                   newChar:String):String
+    {
+        const len:int = capturedMatch1.length;
+        const s:String = StringUtil.repeat(newChar, len);
+        const n:String = matchedSubstring.substr(0,
+            matchedSubstring.length - len) + s;
+        return n;
+    }
+    
     private function updatePattern():void
     {
         if (!_dateTimeSkeletonPattern)

        {
            _elementPatternList =
                DateTimeFormatterEx.analysePattern(dateTimePattern,
                    (super.dateStyle != "none"), (super.timeStyle != "none"));
            addPrefixes(dateTimePattern, _elementPatternList);
        }
        

                    break;
            }
            if (element)
                elementList.push(element);
        }
    }
    
    /**
     *  @private
     *  extractTimeElements() function.
     *
     *  @langversion 3.0
     *  @playerversion Flash 11
     *  @playerversion AIR 3
     *  @productversion Flex 4.5.2
     */
    private static function extractTimeElements(
        pattern:String, elementList:Array):void
    {
        var regExpOut:Object;
        for (var i:int = 0; i < 4; i++)
        {
            var element:Object = null;
            switch (i)
            {
                case 0:
                    regExpOut = REGEXP_HOUR.exec(pattern);
                    if (regExpOut)
                        element = { name: "hour", pattern: regExpOut[2],
                            index: ((regExpOut["index"] as int)
                                + (regExpOut[1] as String).length) };
                    break;
                case 1:
                    regExpOut = REGEXP_MINUTE.exec(pattern);
                    if (regExpOut)
                        element = { name: "minute", pattern: regExpOut[2],
                            index: ((regExpOut["index"] as int)
                                + (regExpOut[1] as String).length) };
                    break;
                case 2:
                    regExpOut = REGEXP_SECOND.exec(pattern);
                    if (regExpOut)
                        element = { name: "second", pattern: regExpOut[2],
                            index: ((regExpOut["index"] as int)
                                + (regExpOut[1] as String).length) };
                    break;
                case 3:
                    regExpOut = REGEXP_AMPM.exec(pattern);
                    if (regExpOut)
                        element = { name: "ampm", pattern: regExpOut[2],
                            index: ((regExpOut["index"] as int)
                                + (regExpOut[1] as String).length) };
                    break;
            }
            if (element)
                elementList.push(element);
        }
    }
}
}
