aoc/2018/5/part1.js

9 lines
355 B
JavaScript
Raw Normal View History

2018-12-05 07:39:48 +00:00
const fs = require('fs');
let input = fs.readFileSync('input.txt', 'utf-8');
let exp = /(qQ|wW|eE|rR|tT|yY|uU|iI|oO|pP|aA|sS|dD|fF|gG|hH|jJ|kK|lL|zZ|xX|cC|vV|bB|nN|mM|Qq|Ww|Ee|Rr|Tt|Yy|Uu|Ii|Oo|Pp|Aa|Ss|Dd|Ff|Gg|Hh|Jj|Kk|Ll|Zz|Xx|Cc|Vv|Bb|Nn|Mm)/g;
while (input.match(exp)) {
input = input.replace(exp, '')
}
console.log(input)
console.log(input.length)