Page 1 of 1

compare text

Posted: Thu May 21, 2015 9:48 am
by aebki
Hi,

How can i compare to string / text to see if they are equals?

In fact what i want is to be able to see if for example that: "Hello" is different of "hello".
So the 'matchText' is not useful i think...

regards.

Re: compare text

Posted: Thu May 21, 2015 10:11 am
by Thierry
Hi,

You can prefix your regex with (?i), i.e: "(?i)HellO"
to be case insensitive.
In fact what i want is to be able to see if for example that: "Hello" is different of "hello".
and for this, you don't and "HellO' should not match "hello"

Or did I miss something?

Regards,

Thierry

Re: compare text

Posted: Thu May 21, 2015 2:15 pm
by aebki
Hi Thierry,

Thanks for your answer! :-)

In fact i need to compare what i wrote in one field with what i have in one variable that i am reading from one database...

So my question was how to compare the text of field "FldPassword" with the variable MyPassword.

if the text of field "FldPassword" is not MyPassword then


end if

So if i understood well, this should work?

if the text of field "FldPassword" is not (?ยก)MyPassword then


end if

Regards.

Re: compare text

Posted: Thu May 21, 2015 2:27 pm
by Thierry
aebki wrote: So my question was how to compare the text of field "FldPassword" with the variable MyPassword.
Umm, my answer was specific to matchText(), matchChunk() or replaceText() functions.

In your case, you only need to add a statement:

Code: Select all

set the caseSensitive to true
if the text of field "FldPassword" is not MyPassword then ...
HTH,

Thierry

Re: compare text

Posted: Mon May 25, 2015 8:10 pm
by aebki
Hi Thierry,

Thanks for your answer...

And sorry for my late answer...I didn't enter in the forum till today...:-(

I will test it!

Regards.