регулярное выражение без учета акцента

Мой код:

jQuery.fn.extend({
 highlight: function(search){
  var regex = new RegExp('(<[^>]*>)|('+ search.replace(/[.+]i/,"$0") +')','ig');

  return this.html(this.html().replace(regex, function(a, b, c){
   return (a.charAt(0) == '<') ? a : '<strong class="highlight">' + c + '</strong>';
  }));
 }

});

Я хочу выделять буквы акцентами, например:

$('body').highlight("cao");

должен выделить: [ção] OR [çÃo] OR [cáo] OR expre [cão ]tion OR [Cáo ]tion

Как я могу это сделать?

8
задан tchrist 11 April 2015 в 00:18
поделиться