Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- # call with, say, "./parse-tags.pl tagdata_mefi.txt" or "tagdata_*"
- $debug = 0;
- while (<>) {
- chomp;
- if ($_ =~ /^(.+?)\t(.+?)\t(.+?)\t(\S+)/) {
- ($tag_id, $link_id, $link_date, $tag_name) =
- ($1, $2, $3, $4);
- if ($debug) {print "parsed: $tag_id, $link_id, $link_date, $tag_name\n";}
- if ($tag_name =~ /[\x00-\x19]|[\x7F-\xFF]|\"/ ) {
- # quotes, & characters outside POSIX [:print:] [\x20-\x7E]
- # (Visible characters and spaces outside usual printable area)
- print "tag_name: $tag_id, $link_id, $link_date, $tag_name\n";
- } # end tag_name check
- }
- } # end <>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement