Re: Searching in a line



lerameur wrote:
Hello all,

I want to do a search in a log file. each line has the following
pattern:
34,56,,9,0,0,,,,65;
So there 10 section. How do I parse through different sections?

perldoc -f split

meaning I want section 4, which is the number 9

$sec4 = split($value)[3]

jue


.



Relevant Pages

  • Parsing a test file
    ... I'm pretty new to Java and have been assigned to parse a log file. ... I have several tokens that I need to look ... That value must match a pattern. ...
    (comp.lang.java.programmer)
  • Searching in a line
    ... I want to do a search in a log file. ... How do I parse through different sections? ... meaning I want section 4, ...
    (comp.lang.perl.misc)
  • Re: Searching in a line
    ... I want to do a search in a log file. ... How do I parse through different sections? ... then you can just split on a comma, ...
    (comp.lang.perl.misc)
  • [ANN] Apache::LogRegex 1.1 minor bugfix release
    ... Apache::LogRegex - Parse a line from an Apache logfile into a hash ... Designed as a simple class to parse Apache log files. ... The field names of the hash are derived from the log file format. ...
    (comp.lang.perl.modules)
  • ANN: Apache::LogRegex 1.2
    ... Designed as a simple class to parse Apache log files. ... lines from the log file line by line returning a hash of each line. ...
    (comp.lang.perl.modules)