batcater98 has asked for the wisdom of the Perl Monks concerning the following question:
I have a flat file with rows and rows of data, in this file I need to skip most lines, but others I need to extract data from. Below is an example of a line that I need to pull data from and what data I need. Does anyone have an idea of what to match on and how to pull that data?
DATA:
e:\logfiles\beardstownbase.log [3] Thu 22Jun06 08:07:19 - (006415) Sent file d:\data\58bn5904.dat successfully (25.0 Kb/sec - 859216 bytes)It will look like this every time only the information I need will change other items to key from will remain the same.
I need to key off of the following the .dat & successfully when I find those two on the same line I want to extract the following using a Regex. Other lines Skip.
From example Data I would want to pull:
beardstownbase,Thu 22Jun06 08:07:19,58bn5904,859216 bytesknowing that each of these feilds will change, but surrounding data will not change. Ideas?
I could see keying off of the //'s and the -' or ('s...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Regex Help pulling Data from a string
by chargrill (Parson) on Dec 21, 2006 at 20:56 UTC | |
|
Re: Regex Help - Large regex example, and larger Parse::RecDescent attempt
by imp (Priest) on Dec 22, 2006 at 06:39 UTC |