in reply to pattern matching between two specific strings
You can break up the input file into records by setting the record seperator,
Without seeing your data, I can't say much about your regex or how it parses.#!/usr/local/bin/perl my ($in_filename, @records) = 'graph_set.out'; { local $/ = ' PLUTO4 finished'; my $start = ' Final graph set matrix'; open IN, '<' $in_filename or die "Can't open $in_filename: ", $!; @records = map { substr $_, index( $_, $start) + length( $start} } <IN>; chomp @records; close (IN); }
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: pattern matching between two specific strings
by harry34 (Sexton) on Jul 08, 2003 at 12:52 UTC |