ureech,
const escapeRegExp = str => str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
const createRegExp = str => {
str = str.split('*');
str = str.map(e => escapeRegExp(e));
str = str.join('[-a-z.0-9_]+');
return new RegExp('^' + str + '$')
};
let arr = ["news", "posts/*", "articles/statiy"];
arr = arr.map(createRegExp);
let adr = 'posts/index.html';
let test = arr.some(reg => reg.test(adr))
alert([adr, test]);
adr = 'posts/проверка.html';
test = arr.some(reg => reg.test(adr));
alert([adr, test])