Is there a way in HTML (JavaScript) to write a regular expression to negate an exact string match?
I would like to make sure an input is not equal to "foo". Only "foo" must fail validation, but "fooo" must be allowed.
In other words, I'm looking for a negation of this regex:
<input pattern="^foo$" ...>
 
     
     
     
    