Generation

generate functionSun, 14 May 2023

Software to manipulate a text file (modify and delete texts) using regular expressions RE

var fs = require('fs'); var text = fs.readFileSync('input.txt').toString(); var text = text.replace(/\b[Aa]d{2,}[a-z]*\b/g, "edit"); var text = text.replace(/\b[Dd]d{2,}[a-z]*\b/g, "delete"); fs.writeFileSync('output.txt', text);

Javascript
Generate More

Questions about programming?Chat with your personal AI assistant