Compare decimal numbers in an alphanumeric value without preg_replace - PHP -


is possible compare decimal values value contains alphanumeric characters without using preg_replace or stripping out non-numeric values?

for instance comparing these 2 decimal values ( ignoring letters) simple operator >:
'down0.1.5.3'
'down0.1.7.1'

var_dump(version_compare('down0.1.5.3', 'down0.1.7.1')); var_dump(version_compare('down0.1.8.3', 'down0.1.7.1')); 

version_compare()


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -