Joe Nciri schrieb: > a have a line to parse.... > > 10.88.90.75 - - [16/Jul/2007:07:46:09 -0400] "GET /star/images/main.gif > HTTP/1.1" 200 334 > > > anyone has a better idea... got stuck coming up with one simple regex ( > the double quote...) Need to tokenize the line, > > token 1 = 10.88.90.75 > token 2 = - > token 3 = - > token 4 = [16/Jul/2007:07:46:09 -0400] > token 5 = "GET /star/images/main.gif HTTP/1.1" > token 6 = 200 > token 7 = 234 > > > can some one help please. > > Joe. > line = "10.88.90.75 - - [16/Jul/2007:07:46:09 -0400] \"GET star/images/main.gif HTTP/1.1\" 200 334" token = /^(.*?)\s+(.*?)\s+(.*?)\s+(\[.*?\])\s+(\".*?\")\s+(\d+)\s+(\d+)$/.match(line) => token[1] = 10.88.90.75 token[2] = - token[3] = - etc. BR Phil