I have a version number as a string, the version number can have major version as well as up to 3 minor version positions.
E.g. 3.4.0.1
I need to find out if this version is within a predefined version range:
E.g 3.1.0 - 3.3.5.1
I can parse the versions to 4 integers and do a comparison then but I’m sure there is a much more elegant solution for that.
Thanks
Update
I guess it can be simplified further if assuming that the version range has only one minor version position, E.g 3.0 - 3.4
Use version_compare: