JSFiddle - React, Tailwind, and code Playground
HTML
<p>
<a href=https://example.com/evil.eXe>Do not click</a>
</p>
<output></output>
CSS
body {
font-family: system-ui, sans-serif;
background-color: lightcoral;
margin: 40px;
}
output {
font-size: 1.3rem;
font-weight: bold;
}
JavaScript
const link = $('a').first();
if (/[.]exe$/i.test(link.attr('href')))
$('output').text('The link is evil.');
// From:
// https://stackoverflow.com/a/53555186