let arr = [
"handOn",
"hands",
"hanDLes",
"Handcuffs",
"handmade",
"in-hands",
"HANDINGLY",
];
// Output: ['hands', 'hanDLes', 'Handcuffs', 'HANDINGLY']
let filter = arr.filter((ele) => {
return ele.match(/^hand\w*(s|y|le)$/gi);
});
console.log(filter);
bGV0IGFyciA9IFsKICAiaGFuZE9uIiwKICAiaGFuZHMiLAogICJoYW5ETGVzIiwKICAiSGFuZGN1ZmZzIiwKICAiaGFuZG1hZGUiLAogICJpbi1oYW5kcyIsCiAgIkhBTkRJTkdMWSIsCl07CgovLyBPdXRwdXQ6IFsnaGFuZHMnLCAnaGFuRExlcycsICdIYW5kY3VmZnMnLCAnSEFORElOR0xZJ10KCmxldCBmaWx0ZXIgPSBhcnIuZmlsdGVyKChlbGUpID0+IHsKICByZXR1cm4gZWxlLm1hdGNoKC9eaGFuZFx3KihzfHl8bGUpJC9naSk7Cn0pOwoKY29uc29sZS5sb2coZmlsdGVyKTsK