JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" pattern="(cat|dog)\s[A-Z]{1}[a-z0-9]+">
<br/>
<!-- sto dicendo che dopo la maiuscola puoi inserire quello che vuoi tranne l'underscore -->
<input type="text" pattern="(cat|dog)\s[A-Z]{1}[^_]+">
CSS
input:invalid {
border: 2px solid red;
}