Here I am faced with an issue that I believe(or at least hope) was solved 1 million times already. What I got as the input is a string that represents a length of an object
The regexp would look something like this:
"([0-9]+)'\s*([0-9]+)\""
(where \s represents whitespace - I'm not sure how it works in php). Then you extract the first + second group and do
(int(grp1)*12+int(grp2))*2.54
to convert to centimeters.