CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner: Re: [amanjosan2008] How to skip 14 digits from a syslog file??: Edit Log



Laurent_R
Veteran / Moderator

Jul 21, 2013, 1:43 AM


Views: 5519
Re: [amanjosan2008] How to skip 14 digits from a syslog file??

This really seems to be a rather easy task, but the input lines that you are showing change from one of your posts to the next.

I gave you a regular expression that that would remove the time stamp from the first version of your description of the input line:


Code
s/\[[\d ]\d{4}\.\d{6}]//;

I even showed you where to put it (before the split).

You are now showing a very different input line. It seems that you are giving only part of the line (without the beginning). And furthermore, you don't put it within code tags as I requested, so the lines are reformatted.

There is no way to do data munging without a precise and exact knowledge of the data input format.

Please provide exact samples of the complete input line (or, at least, the complete beginning of the line) for each of the two cases, and enclose them within code tags. Actually, two or three lines for each case would be great, as it would enable me to figure out what is constant and what is changing from one line to the next in each of the two basic cases. Under these conditions, I will certainly be able to give you a solution.


(This post was edited by Laurent_R on Jul 21, 2013, 1:47 AM)


Edit Log:
Post edited by Laurent_R (Veteran) on Jul 21, 2013, 1:45 AM
Post edited by Laurent_R (Veteran) on Jul 21, 2013, 1:47 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives