in reply to Re^2: Regex random values pattern match and code efficiency
in thread Regex random values pattern match and code efficiency
just a basic regex loop.. try to adapt this..
HOST
IP
CONFIG
kindly perlig
prints:use strict; my $value='$DOMAIN{HOST},$DOMAIN{IP},$DOMAIN{CONFIG}'; my @data = split(',',$value); foreach my $attributes (@data) { $attributes=~ m/(DOMAIN){(.+?)}/; print $2."\n"; }
HOST
IP
CONFIG
kindly perlig
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Regex random values pattern match and code efficiency
by AlexTape (Monk) on Sep 12, 2013 at 14:14 UTC | |
Re^4: Regex random values pattern match and code efficiency
by Mark.Allan (Sexton) on Sep 13, 2013 at 12:18 UTC |
In Section
Seekers of Perl Wisdom