           continue
 
         processPDF = (fun, props, pdf) ->
-          match = /(?:\/|\\)([a-z-]+)(\d+)\.pdf$/i.exec props.path
+          match = ARXIV_OLD_ID_REGEX.exec props.path
           if match
             id = match[1] + '/' + match[2]
           else
-            match = /(?:\/|\\)([\d.]+)\.pdf$/i.exec props.path
+            match = ARXIV_NEW_ID_REGEX.exec props.path
             if match
               id = match[1]
             else

      secretAccessKey: Meteor.settings.AWS.secretAccessKey
  else
    console.warn "AWS settings missing, arXiv PDF processing will not work"

  Meteor.methods
    'refresh-arxhiv-pdfs': ->


          Storage.save 'arxiv' + Storage._path.sep + id + '.pdf', pdf

      console.log "Done"
