Help for this page

Select Code to Download


  1. or download this
    $xml =~ s/[\r\n\t]//g;
    $xml =~ tr/\x80-\xff/_/;
    $xml =~ tr/\x00-\x1f/_/;
    
  2. or download this
    # This is the regex from XML::TiePYX
    $xml =~ s{([\xc0-\xc3])(.)}{ my $hi = ord($1); my $lo = ord($2); chr((
    +($hi & 0x03) <<6) | ($lo & 0x3F)) }ge;