Pegar um numeral contido em uma string


Segue exemplo um exemplo básico mostrando como pegar um numeral que faz parte de uma string em JavaScript


<!DOCTYPE html>
<html>
<head>
<title>compilacaohibrida.blogspot.com.br</title>
</head>
<body>
<script type="text/javascript">
let resp = "CARLOS TEM 18 ANOS";
console.log("RESULTADO: "+resp.search(/\d/));
</script>
</body>
</html>