I have an HTML string and i wrote a simple app script regex
const write = console.log // just for the snippet
const short_string = `Total Amount Due:</td>
<td>$130.96</td>
</tr>
<tr>
<td>Draft Date:</td>
<td>January 21, 2022 <`
var regex= new RegExp('\$([+-]?([0-9]*)(\.([0-9]+))?)','gi');
var result=regex.exec(short_string);
write(result);
why does it return empty result
[, , , null, null]