Skip to content

Instantly share code, notes, and snippets.

View Gabriellopes232's full-sized avatar
💻
typing...

Gabriel Lopes Gabriellopes232

💻
typing...
View GitHub Profile
@Gabriellopes232
Gabriellopes232 / planilhas-script.js
Last active February 12, 2023 15:09
script to check information from two worksheets
import { readFileSync, writeFileSync } from 'fs'
function readCSV(path) {
const fileSystem = readFileSync(path, { encoding: 'utf-8' })
const plateRegex = new RegExp(/[A-Z]{3}[0-9][0-9A-Z][0-9]{2}/g)
const plates = fileSystem.toString().match(plateRegex)
return plates;
}
const worksheetsPlates1 = readCSV('./planilhas-placas1.csv')