Jump to content
Sign in to follow this  
autoITnewbie

string compare

Recommended Posts

StringRegExp can do it for you: the pattern you're looking for IS EXACTLY the text you want, and it's case sensitive...


A good program computing A into B is mostly one that won't crash in all the other cases...

Share this post


Link to post
Share on other sites

$string = "damn...in 8 weeks I'm home...can't wait !"
$string2 = "Damn...in 8 weeks I'm home...can't wait !"

; 1st example
; Not case sensitive

If $string = $string2 Then
MsgBox(64,"","Matched !")
Else
MsgBox(64,"","Didn't match..")
EndIf

;2nd example
; Case sensitive

If $string == $string2 Then
MsgBox(64,"","Matched !")
Else
MsgBox(64,"","Didn't match..")
EndIf

(Code is untested, but should work)

Note the use of the two "==" in the second example,

which requires an exact match... Case sensitive !

Edited by Helge

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...