How do you extract data from input box that uses dynamic id -> uid?

How do you extract data from input box that uses dynamic id -> uid?

I need to pull the data from an input box. The problem is that the id associated with the input box is dynamic.. If you look at the script below you will see the following ->"uid_loanAmount_16597654821991736" . However that number changes each time a visitor to the site. so next time it could be "uid_loanAmount_234568385923" or some other random number. So when I write the script to pull data from this id I can't include the number portion of the id. Does anyone have any suggestion? 
 
<input id="uid_loanAmount_16597654821991736" type="number" name="loanAmount" class="form-control input-large input-small no-arrows number" min="0" step="1" aria-describedby="uid_loanAmount_16597654821991736-error" aria-required="true" aria-invalid="false">
 
I want to do soemthing like the following script to extract the imput in this field.

$("[name='loanAmount]").mouseleave(function(){
 var loanAmount = $this("#uid_loanAmount_*") ;
if (loanAmount.length){
s.evar17 = (loanAmount_ );
}else {// do something
     return false;
}
});