You can use this list of words https://github.com/dwyl/english-words
var input = "hello123fdwelcome";
var fs = require('fs');
fs.readFile("words.txt", function(words) {
var words = words.toString().split('\n').filter(function(word) {
return word.length >= 4;
});
var output = [];
words.forEach(word) {
if (input.match(word)) {
output.push(word);
}
});
console.log(output);
});
solved Javascript: find english word in string [closed]