/*********************************************************** * @author Maria A. Zamora * @company Digitec Interactive Inc. * @version 0.1 * @date 12/14/2010 * *HTMLtable class for conceptsFrame3 movie of the CEE application * CS5 version of com.digitec.cee.HTMLtable **********************************************************/ package com.digitec.cee { public class HTMLtable { private var _isbn:String; private var _htmlTableOfContent:String; public function HTMLtable( _html:String ) { //SEARCH FOR STRING "<H4>" + ISBN + </H4> var matchPub:RegExp =/<h4>.+?<\/h4>/ix; //THIS MATCH ALL THE TEXT BETWEEN <H4> AND </H4>, INCLUDING THE TAGS OF FIRST INSTANCE var arr:Array = _html.match(matchPub) ; //output: <H4> xxxxxxxxxxxxxxx </H4> var fname:String = arr[0].replace("<h4>", ""); //eliminate <h4> fname = fname.replace("</h4>", ""); //eliminate </h4> fname = fname.replace("<H4>", ""); //eliminate <H4> if any fname = fname.replace("</H4>", ""); //eliminate </H4> if any _isbn = fname; _htmlTableOfContent = _html; } /******************************************************************* * GET FUNCTIONS *******************************************************************/ public function get isbn():String{ return _isbn; } public function get htmlTableOfContent():String { return _htmlTableOfContent; } } // Main class } //end package