Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > extracting a range of lines.

Reply
Thread Tools

extracting a range of lines.

 
 
test
Guest
Posts: n/a
 
      04-16-2006
i am trying to parse a something similar to this format.
the staring line can be starting at any hour(line1)and last line can be
any hour. when the day changes to the next day. the hour changes to 00
(line 12)

how can i the first 11 lines
(17:00 -> 23:3
then
(00:01 -> 23:3
and so on and so on.

basically i want to create a file for each 24 hours. the only thing
consistent is the first 00 for each day.
/\[\d\] \[00:/

[1] [17:00:00.234234] blan blah blah
[2] [17:30:00.234234] blan blah blah
[1] [17:34:00.234234] blan blah blah
[1] [18:00:00.234234] blan blah blah
[2] [19:30:00.234234] blan blah blah
[1] [20:34:00.234234] blan blah blah
[1] [21:00:00.234234] blan blah blah
[2] [22:30:00.234234] blan blah blah
[1] [23:25:00.234234] blan blah blah
[1] [23:34:00.234234] blan blah blah
[1] [23:38:00.234234] blan blah blah
[1] [00:01:00.234234] blan blah blah
[1] [00:04:00.234234] blan blah blah
[1] [00:08:00.234234] blan blah blah
[1] [03:59:00.234234] blan blah blah
[1] [05:24:00.234234] blan blah blah
[1] [09:38:00.234234] blan blah blah
[1] [17:00:00.234234] blan blah blah
[2] [17:30:00.234234] blan blah blah
[1] [17:34:00.234234] blan blah blah
[1] [18:00:00.234234] blan blah blah
[2] [19:30:00.234234] blan blah blah
[1] [20:34:00.234234] blan blah blah
[1] [21:00:00.234234] blan blah blah
[2] [22:30:00.234234] blan blah blah
[1] [23:25:00.234234] blan blah blah
[1] [23:34:00.234234] blan blah blah
[1] [23:38:00.234234] blan blah blah
[1] [00:01:00.234234] blan blah blah
[1] [00:04:00.234234] blan blah blah
[1] [00:08:00.234234] blan blah blah
[1] [03:59:00.234234] blan blah blah
[1] [05:24:00.234234] blan blah blah
[1] [09:38:00.234234] blan blah blah


all help is appreciated and thanks for looking.

thanks.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extracting a range of words! vivek_12315 Perl Misc 5 12-17-2010 08:53 AM
How can I transform source range to destination range that is thesame as source? Lambda C++ 2 07-16-2008 05:18 PM
Extracting range of lines tmarc Ruby 2 07-15-2008 11:54 AM
range() is not the best way to check range? Summercoolness@gmail.com Python 46 07-25-2006 08:10 PM
Scene range vs dynamic range Robert Feinman Digital Photography 2 07-04-2005 09:30 PM



Advertisments