Jump to content
Sign in to follow this  
jerem488

Find a string in another substring

Recommended Posts

jerem488

Hello,

I have a very small problem. I have to string

1) 2.20.920

2) 2.20.0.920

And for me it is the same string. I have test with StringInStr() function, but for him it is différent.... sad.gif

I think I must use the StringRegExpReplace function, but I don't know how to use...

Thanks


Qui ose gagneWho Dares Win[left]CyberExploit[/left]

Share this post


Link to post
Share on other sites
BrettF

Share this post


Link to post
Share on other sites
oMBRa

if you want just check if they are equal you could replace all ''.'' with nothing and do the comparison

Share this post


Link to post
Share on other sites
jerem488

If I replace all "." with nothing and do the comparison, the result is equal to outside (they are different)


Qui ose gagneWho Dares Win[left]CyberExploit[/left]

Share this post


Link to post
Share on other sites
jerem488

I am doing like this, and it works

$Version_CCleaner_Internet = StringStripWS($Version_Text,8)

$Version_CCleaner_Install = FileGetVersion(@ProgramFilesDir & "\CCleaner\CCleaner.exe")
$VersionEqual = 1
$Data = StringSplit($Version_CCleaner_Install,".")
For $i = 1 To $Data[0]
    If Not StringInStr($Version_CCleaner_Internet,$Data[$i]) Then
        $VersionEqual = 0
    EndIf
    ;ConsoleWrite($Data[$i]&@CRLF)
Next
ConsoleWrite($VersionEqual&@CRLF)

Thank you


Qui ose gagneWho Dares Win[left]CyberExploit[/left]

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
Sign in to follow this  

×