JSFiddle - React, Tailwind, and code Playground
HTML
<div>
<input type="text" id="input" value="Mozilla" />
<button onclick="func()">Test</button>
<span id="result"></span>
</div>
JavaScript
function func(i) {
var regex = /^(?!Mozilla)/;
var input = document.getElementById('input').value;
var result = regex.test(input);
document.getElementById('result').innerHTML = 'Result: ' + result;
}