Regular Expression Search and parse?
Samuel Baldwin
shardz4217 at gmail.com
Thu Jan 17 19:01:14 EST 2008
> Eugene Gorelik wrote:
> > This is easily doable with perl :
> >
> > open(MYFILE,'/path/to/file');
> > while (<MYFILE>) {
> > chomp;
> > if ( $_ =~ /^(.*)\[ISBN:(.*)\](.*)$/){
> > print "ISBN $2";
> > }
> > }
> >
> > Second (.*) is your ISBN number
http://www.perlmonks.org/?node_id=24640 [ Death to Dot Star! ]
--
Samuel 'Shardz' Baldwin
Shardz's Igloo: shardz.homelinux.net // Down at the moment
Registered GNU/Linux User #410639
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the Discuss
mailing list