A00: A10: A20: A30:
A01: A11: A21: A31:
A02: A12: A22: A32:
A03: A13: A23: A33:


B00: B10: B20: B30:
B01: B11: B21: B31:
B02: B12: B22: B32:
B03: B13: B23: B33:

Keep [something *] zero [* something]
Keep [0 +] something [+ 0]
Keep [1 *] something [* 1]



out:

Note: this does not perform any math operation at all, it's just string manipulation, it just copy-pastes the values where they should be.

It won't take into account things like order of operations, if you fill one of the values with a sum, like 4+3 it's going to end up wrong.
Consider putting in your own parenthesis to keep the order of operations, like (4+3)