in reply to some regex help
Would this do the trick?
#! /usr/bin/perl use strict; use Data::Dumper; my %hash; for (<DATA>) { $hash{$1} = $2 if /Managed Code\s+(\S+)\s*=\s*(\S+)/; } print Dumper \%hash; __DATA__ Managed Node XYZ123 = MN Type = Combo Rim = Planner
Those who know that they are profound strive for clarity. Those who
would like to seem profound to the crowd strive for obscurity.
--Friedrich Nietzsche
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: some regex help
by emilford (Friar) on Apr 06, 2004 at 01:04 UTC | |
|