473,407 Members | 2,314 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

extracting a range of lines.

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:38)
then
(00:01 -> 23:38)
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.
Apr 16 '06 #1
0 2706

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: lecichy | last post by:
Hello Heres the situation: I got a file with lines like: name:second_name:somenumber:otherinfo etc with different values between colons ( just like passwd file) What I want is to extract...
2
by: Steve | last post by:
Hi, I have a very long string, someting like: DISPLAY=localhost:0.0,FORT_BUFFERED=true, F_ERROPT1=271\,271\,2\,1\,2\,2\,2\,2,G03BASIS=/opt/g03b05/g03/basis,...
1
by: Paul Porcelli | last post by:
I have the following code(excerpt) which grabs some lines from a syslog file and adds any found in the range to an array. @lines=();@vvlines=(); $t = new Net::Telnet (Timeout => 30, Prompt =>...
5
by: Michael Hill | last post by:
Hi, folks. I am writing a Javascript program that accepts (x, y) data pairs from a text box and then analyzes that data in various ways. This is my first time using text area boxes; in the past,...
1
by: Cognizance | last post by:
Hi gang, I'm an ASP developer by trade, but I've had to create client side scripts with JavaScript many times in the past. Simple things, like validating form elements and such. Now I've been...
2
by: Dickyb | last post by:
Extracting an Icon and Placing It On The Desktop (C# Language) I constructed a suite of programs in C++ several years ago that handle my financial portfolio, and now I have converted them to...
16
by: Preben Randhol | last post by:
Hi A short newbie question. I would like to extract some values from a given text file directly into python variables. Can this be done simply by either standard library or other libraries? Some...
2
by: Debbie | last post by:
Is there a standard way to extract text from a web page, without using innertext/innerhtml? It's an academic exercise, and we've been advised that we can't use Internet Explorer DOM extensions...
3
by: Clarisa | last post by:
Hello Folks I am working on extracting lines of data in a text file based on the string it contains. This is the text file called info.txt:
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.