fork download
  1. const pattern = /^hand(\w|-|@)*(s|y|le)$/i
  2. const array = ['handOn', 'hands', 'hanDLes', 'Handcuffs', 'handmade', 'in-hands', 'HANDINGLY'];
  3. const res = array.filter(item => pattern.test(item))
  4. console.log(res)
Success #stdin #stdout 0.05s 16680KB
stdin
Standard input is empty
stdout
hands,hanDLes,Handcuffs,HANDINGLY