I had to rewrite this regular expression for Unicode (utf-8, cyrillic):
match: /\b(\w{2,})$/,
Using this regular expressions:
(/[\wа-я]+/ig)
(/[\w\u0430-\u044f]+/ig)
I rewrote this way:
match: /\b(\wа-яa-z{2,})+/ig$/
But my reg.exp code 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 + ' ';}
}]);