UNPKG

docparse-supplier-nge

Version:

process ngrid electric utility bill data for use in the docparse system

11 lines (10 loc) 299 B
var re = require('regex-extract'); module.exports = function(text) { var pattern = /Supply Services[\s\S]*Total Supply Services.*$/m; var matches = text.match(pattern); if (!matches) { // no supplier charges whatsoever, let alone other charges return null; } return matches[0]; };