There is a string that contains numbers, - , spaces between them, and cm : $string = 50 — 55 см
Numbers may be different.
How to delete everything and leave only the last number: 55 . Without letters, without spaces and dashes?
Tried using preg_replace('/см/','',$string); but so i will remove only см