in reply to get some part of the string using regex
Cheers#!/usr/bin/perl -w use strict; while(<>) { chomp; next unless($_ =~ /\|/); #Skip if no pipe sy +mbol my @fields = split '\|', $_; $fields[0] =~ s/^>//; #Remove leading ang +le-bracket print $fields[0], " == ", $fields[1], "\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: get some part of the string using regex
by Sifmole (Chaplain) on May 17, 2002 at 11:23 UTC |