Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
local $/=undef; open(F, "named.conf") || die $!; my $zonedata=<F>; close F; if ($zonedata=~/(zone\s+"$domain"\s+\{\r?\n(.*?)\r?\n(.*?)\r?\n(\s+)?\ +};(\r?\n)+)/) { print "Got a match on $1\n"; $zonedata=~s/$1//; #write out.. }
zone "foobar.com" { type master; file "named.foobar.com"; };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: regex large named.conf parsing
by dragonchild (Archbishop) on Jul 21, 2003 at 13:40 UTC | |
|
Re: regex large named.conf parsing
by Skeeve (Parson) on Jul 21, 2003 at 13:36 UTC | |
|
Re: regex large named.conf parsing
by dws (Chancellor) on Jul 21, 2003 at 21:13 UTC | |
|
Re: regex large named.conf parsing
by TVSET (Chaplain) on Jul 21, 2003 at 22:01 UTC |