I'm using ruby to read a file and I need to somehow parse some data from each line and store it in an array. Two example 'lines' from the file are:
64.34.145.197 - - [03/Sep/2006:05:31:37 -0400] "GET /robots.txt HTTP/1.0" 200 56
64.34.145.197 - - [03/Sep/2006:05:31:37 -0400] "GET /manual/mod/mod_autoindex.html HTTP/1.0" 200 39134
From this I need to get /robots.txt and /manual/mod/mod_autoindex.html. Using the following simple RegEx, I've been able to extract GET /robots.txt and GET /manual/mod/mod_autoindex.html but I can't seem to shake the GET.
arr.push(/GET \S+/.match(line))
I've tried some look ahead's but i'm pretty much a RegEx n00b. Any help is greatly appreciated.