anomy-list

regex matching in anomy HTML

From: Colin Stubbs (41810@xyz.molar.is)
Date: Mon 29 Apr 2002 - 07:04:39 UTC

  • Next message: Tim Bergen: "Permission Problems?"

    Hello the list

    Got a bit of regex error. Best I understand regex, that line below is wrong, as it's only the top-level matches that get put into $1-$x ??, so since there is only 4 top-level matches there, $5 and $6 are non-existant. And thus the errors below.

    This:

    $attr =~ s/(\s+)([a-z0-9_:-]+)(?:(\s*=(?:3D)?)(?:\"([^\"]+)\"|\'([^\']+)\'|([^\'\"\s=]\S*)))?(?=(?:\s|$))/
            $self->cleanTag_2($tag, $val, $1, $2, $3, $4.$5.$6);

    Generates this:

    Apr 29 09:19:56 gw mimedefang-multiplexor: Slave 0 stderr: Use of uninitialized value at /usr/local/lib/perl5/site_perl/5.005/Anomy/HTMLCleaner.pm line 622, <IN> chunk 38.
    Apr 29 09:19:56 gw mimedefang-multiplexor: Slave 0 stderr: Use of uninitialized value at /usr/local/lib/perl5/site_perl/5.005/Anomy/HTMLCleaner.pm line 622, <IN> chunk 38.
    Apr 29 09:19:56 gw mimedefang-multiplexor: Slave 0 stderr: Use of uninitialized value at /usr/local/bin/mimedefang.pl line 2340, <IN> chunk 39.
    Apr 29 09:19:56 gw mimedefang-multiplexor: Slave 0 stderr: Use of uninitialized value at /usr/local/bin/mimedefang.pl line 2340, <IN> chunk 40.
    Apr 29 09:19:56 gw mimedefang-multiplexor: Slave 0 stderr: Use of uninitialized value at /usr/local/bin/mimedefang.pl line 2340, <IN> chunk 41.
    Apr 29 09:19:56 gw mimedefang-multiplexor: Slave 0 stderr: Use of uninitialized value at /usr/local/bin/mimedefang.pl line 2340, <IN> chunk 41.

    It actually produces about 10 times that amount, but it's all pretty much the same, only the chunk numbers differ.

    The email that I beleive triggered this is attached.

    Attachments:
     + http://mailtools.anomy.net/archives/anomy-list//1d/74/3cccf0aa/01.ENTIRE_MESSAGE



    hosted by molar.is