I have strings with version numbers like:
"1.4.2.57"
"8.4.3"
"3.12.0.25"
I only need the first 3 numbers, I was going to use substr, but if the numbers are > 9 the substr will fail.
How can I extract x.x.x from strings like (x.x – x.x.x – x.x.x.x) where x is = [0-99]
Split by
., then slice to get only first 3 digits (in this case elements, since they were split to an array), then rejoin with.again.