--- a/lib/DNS/Vi.pm Thu Apr 09 13:56:03 2015 +0200
+++ b/lib/DNS/Vi.pm Thu Apr 09 22:06:56 2015 +0200
@@ -33,8 +33,11 @@
foreach (@lines) {
# simplificated comment remover
# after the comment character no '"' is allowed!
- s{^\s*;.*$}{}; # strip comment lines
- s{\s*;[^"]*$}{}; # strip trailing comments
+# s{^\s*;.*$}{}; # strip comment lines
+# s{\s*;[^"]*$}{}; # strip trailing comments
+
+ # see https://regex101.com/r/cG6fK3/2
+ s{\s*(?:;)(?:(?:[^"]|"[^"]*")*$)}{};
state $line;
if (my $range = /(.*)\(\s*$/ .. /(.*)\)\s*/) {
$line .= defined $1 ? $1 : $_;