dcoggie

help to match 2 version numbers

4 posts in this topic

#1 ·  Posted

I'm comparing two strings containing programs (name and versions). The first string is read with a function from information on the computer. the second string is read from a list.
When the version numbers are not exactly the same it shows the program as out of date and this is incorrect.
Is there any way that I  can make it so that when (56.0.2924.87) = (56) it is not shown as out of date?
I want it to print --- Google chrome (56.0.2924.87)

Local $aApps = [[""Google Chrome", "56", 0], ["["Java.+?\d+ Update \d", "8.0.131.11", 3], ["Windows Live Essentials", "16.4.3528.0331", 0]]

Google Chrome (56.0.2924.87) is *out of date* ==> (56)
Java (8.0.1310.11) is *out of date* ==> (8.0.131.11)
Windows Live Essentials 16.4.3528.0331 is *out of date* ==> (16.4)

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Share this post


Link to post
Share on other sites

#3 ·  Posted

Why not use _VersionCompare function?  Example function:

 

Share this post


Link to post
Share on other sites

#4 ·  Posted

Thank you both. That helped.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now