I am a complete novice to Regex. Need help to achieve the below.
I have a file which has many lines as below 2 lines. From this i jus need to extract the time stamp and also the name following the pattern (.html?).
There may be instances when a line may have more than one instance of the pattern .html?. But i need to extract the name only once from each line.
Can someone help.
12.10.219.39 - msundbole330 [10/Mar/2009:12:53:51 -0500] "GET /landing.html?Jenifer%20Holly HTTP/1.0" 200 5983 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)"
12.10.219.39 - msundbole330 [10/Mar/2009:12:53:51 -0500] "GET /images/lock.jpg HTTP/1.0" 304 0 "http://xxxxxx-xxxxxxs.xxxxxxx.com/ccccc.html?Jenifer Holly" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)"
Thanks.
Regular Expression
Moderators: AmigoJack, bbadmin, helios, MudGuard
Regular Expression
Last edited by Deepa on Fri Apr 03, 2009 5:41 am, edited 1 time in total.
-
ben_josephs
- Posts: 2464
- Joined: Sun Mar 02, 2003 9:22 pm
- Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
- Contact: