skip to Main Content

how can I modify this regular expression so that it distinguishes between latin and russian letters in links and emails – Reactjs

At the moment my program looks like this: let final = text; const divElement = document.createElement('div'); // eslint-disable-next-line max-len const linkRegExp = /b(((http(s)?://)([w-]{1,32}(.|:)[w-]{1,32}))|([w-]{1,32}(@)[w-]{1,32}(.)[w-]{1,32})|([w-]{1,32}(.)[A-Za-z]{1,32}))b/gi; function replacer(url) { if (url.match(/S+@S+.S+/ig)) { const email = document.createElement('a'); email.innerHTML = url; email.href = `mailto:${url}`; email.setAttribute('class',…

VIEW QUESTION

YII2 sef urls construction – PHP

I have catalogue with products. Urls for products looks like this domain.com/adv?id=14792. I want to beautify urls like this domain.com/adv/14792. In web.php I tried to like this 'urlManager' => [ 'enablePrettyUrl' => true, 'showScriptName' => false, 'enableStrictParsing' => true, 'rules'…

VIEW QUESTION
Back To Top
Search