Convert cell contents to formula in Libre Office calc

I have a spreadsheet with a column (A in the example) that contains numerical ranges, which I wish to evaluate as a formula.

For example

A B
49-80 31
22-77 55

What do I put in cells in column B to calculate the difference between the two numbers in the corresponding cell in column A?

I have tried using Find/Replace: Find: ^; Replace =; Regular expression ticked. That failed, “Cannot find ^”. Similarly with a find string of ^. and ^* .