I need to store two text value and use them as numbers for subtraction:
<a href="..."><span id="user-account-balance">593 455,07</span> $</a>
<a href="..."><span id="user-account-balance-points">12454</span> P</a>
I need to subtract both values, but it doesn't work for me:
<tr>
<td>storeText</td>
<td>//a/span[@id='user-account-balance']</td>
<td>a</td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars['a'].match(/^\d+/);</td>
<td>one</td>
</tr>
<tr>
<td>storeText</td>
<td>//span[@id='user-account-balance-points']</td>
<td>c</td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars['c'].match(/^\d+/);</td>
<td>two</td>
</tr>
<tr>
<td>store</td>
<td>javascript{storedVars['one']+storedVars['two']}</td>
<td>r</td>
</tr>
<tr>
<td>echo</td>
<td>${r}</td>
<td></td>
</tr>
The result is [info] echo: 59312454. So there are two problems, the first number is cut out after the space and it doesn't even subtract anyway