autoITnewbie Posted January 25, 2005 Share Posted January 25, 2005 Hi, how do I compare a string to another string with exact match not stringinstr. thanks Link to comment Share on other sites More sharing options...
LazyCoder Posted January 25, 2005 Share Posted January 25, 2005 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... Link to comment Share on other sites More sharing options...
Helge Posted January 25, 2005 Share Posted January 25, 2005 (edited) $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 January 25, 2005 by Helge Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now