I had to rewrite this regex for Unicode (utf-8, cyrillic):
match: /\b(\w{2,})$/,
Using these regular expressions:
(/[\w-]+/ig) (/[\w\u0430-\u044f]+/ig)
I rewrote this path:
match: /\b(\w-a-z{2,})+/ig$/
But my reg.exp code is not working. Please help me. Full code:
$('.form-control').textcomplete([ { words: ["","","","","google","git","github","php","microsoft","jquery"], match: /(?:^|[^\w-])([\w-]{2,})$/i, search: function (term, callback) { callback($.map(this.words, function (word) {return word.indexOf(term) === 0 ? word : null;})); }, index: 1,replace: function (word) {return word + ' ';} }]);
source share