How to change hint list anyword based on speific word ?

I write code can check if I write specific word then do alret … I want to change hint list anyword based on speific word … for example I want when I type “class1” then (remove the content of list and add to list the word (class1.one) )… this is link of my code http://jsbin.com/jefixikibi/edit?html,js,output
In my code I can match the word “class1” but I need when I matched to change the content of list … any help ?

My problem solved thanks for all