blast
blast copied to clipboard
Can I search for a RegExp or diacritics?
I need to blast fragments with or without spanish diacritics. Is that possible now? Any suggestion?
Thanks
@aletorrado The only suggestion I can give you is use this function over your string:
function includeRegexAccents(query) {
var expresion = query;
expresion = expresion.replace(/[a\341\301\340\300\342\302\344\304]/ig, "[a\341\301\340\300\342\302\344\304]");
expresion = expresion.replace(/[e\351\311\350\310\352\312\353\313]/ig, "[e\351\311\350\310\352\312\353\313]");
expresion = expresion.replace(/[i\355\315\354\314\356\316\357\317]/ig, "[i\355\315\354\314\356\316\357\317]");
expresion = expresion.replace(/[o\363\323\362\322\364\324\366\326]/ig, "[o\363\323\362\322\364\324\366\326]");
expresion = expresion.replace(/[u\372\332\371\331\373\333\374\334]/ig, "[u\372\332\371\331\373\333\374\334]");
expresion = expresion.replace(/[c\347\307]/ig, "[c\347\307]");
return expresion;
}
Pass the result as a regex through Blast, and enjoy!