is it possible to extract numbers from a *varchar* cell, do math with them and update the cell with the result?

i.e.

* a cell in a column has the value "24a10 b"
* take the 24, the 10 and notice the b
* do 24\*10 = 240
* subtract 1 if there was a b
* store 239 in that field (change the '24a10 b' to '239')
* do this with all the rows in the table