JSFiddle - React, Tailwind, and code Playground
HTML
<div>
<input id="one" value="blabla" />
<input id="two" value="bla^bla" />
<input id="three" value="blabla" />
</div>
JavaScript
var inputs = document.getElementsByTagName("input");
var ids = [];
for(var i = 0; i < inputs.length; i++) {
if(inputs[i].value.match(/.*\^.*/)) {
ids.push(inputs[i].id);
}
}
console.debug(ids);