Compare strings with quotes in them

  • Автор темы Автор темы zenrast
  • Дата начала Дата начала

zenrast

Client
Регистрация
20.03.2013
Сообщения
57
Реакции
1
Баллы
8
Hi,

i have a logical IF.
"{-Variable.keyword1-}"=="{-Variable.keyword2-}"
this returns TRUE if the keywords are the same.

But if the keywords are keywords with a quote like "apple" then the IF
returns FALSE.
The "Executed" in "Action properties" shows
""apple"" == ""apple""
and it returns FALSE.

How should i fix this problem? Is there a way to "trim" the keywords inside IF?
 
Hi,

i have a logical IF.
"{-Variable.keyword1-}"=="{-Variable.keyword2-}"
this returns TRUE if the keywords are the same.

But if the keywords are keywords with a quote like "apple" then the IF
returns FALSE.
The "Executed" in "Action properties" shows
""apple"" == ""apple""
and it returns FALSE.

How should i fix this problem? Is there a way to "trim" the keywords inside IF?
Are you sure that one of the keywords does not contain space or some hodden synbol?
Trim operation is available in Text processing action block
 
Yes, im sure the kewyords does not contain the some extra symbol.
Try to put ""apple""==""apple"" in IF block and run it.
 
IF works this way:
 

Вложения

I solved the problem by using the Text processing trim. Thanks for suggestion.
The Text_comparing.xmlz works for ", but then the problem returns if i have keywords with signle '.


I dont use quarter quotes but if i have a
var a = "\"apple\"";
..combined with IF "a" == "a" ....the end result is quarter quotes.
 
Последнее редактирование:
Good. Like solution u can use it inside if step:
"\"1\"" == "\"1\""

Just replace in ur variables what to search: "
what to replace: \"
 

Кто просматривает тему: (Всего: 0, Пользователи: 0, Гости: 0)