|
thank you for reply.
okey..
this is the example of text that need to be split into several categories after uploaded into the system:
0.50.143.237 - - [31/Oct/2008:11:09:24 +0800] "GET /login/login.php?op=logout HTTP/1.1" 302 3727 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.17) Gecko/20080829 Firefox/2.0.0.17"
60.50.143.237 - - [31/Oct/2008:11:09:24 +0800] "GET /login/login.php?msj=You%20Have%20Been%20Forced%20to%20Logout HTTP/1.1" 200 3766 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.17) Gecko/20080829 Firefox/2.0.0.17"
60.50.143.237 - - [31/Oct/2008:11:09:24 +0800] "GET /images/stylesheet.css HTTP/1.1" 200 1958 "http://www.bppk.gov.my/login/login.php?msj=You%20Have%20Been%20Forced%20to%20Logout" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.17) Gecko/20080829 Firefox/2.0.0.17"
60.50.143.237 - - [31/Oct/2008:11:09:24 +0800] "GET /images/bg_main.gif HTTP/1.1" 200 869 "http://www.bppk.gov.my/images/stylesheet.css" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.17) Gecko/20080829 Firefox/2.0.0.17"
usually the text is more longer than this..
the split divided only 5 categories:ip, date, method, info and url. that's why this code had been made:
var stringToSplit:String = myText.text;
var result:Array = stringToSplit.split(" ");
var Split:LogReader = new LogReader();
Split.ip = result[0];
Split.date = result[3] + result[4];
Split.method = result[5];
Split.info = result[6] + result[7];
Split.url = result[8];
and the package LogReader.as imported in the system made this process works.
my problem is how to make the split process also occur at the next ip address?
my coding only split at the first paragraph..
i want it split simultaneously at the whole paragraph at the text that had been uploaded into the system.
i hope my explanations is good enough to make u understand what is actually i am going to do..
i hope u can help me.
thank you.
Last edited by 0o_o0; 03-12-2009 at 02:12 AM..
|