Skip to content

Instantly share code, notes, and snippets.

@creaktive
Created April 28, 2011 21:06
Show Gist options
  • Save creaktive/947341 to your computer and use it in GitHub Desktop.
Save creaktive/947341 to your computer and use it in GitHub Desktop.
extrai EANs válidos dos XMLs
perl -MBusiness::Barcode::EAN13\ valid_barcode -nE 'say "$ARGV\t$1\t$3" if m{<((?!(pit)?isbn)[^>]+)>(\d{13})</\1>}i and valid_barcode($3)' data/*.xml > eans.txt
# http://www.jacotei.com.br/produtos/index/538011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment