David_Teh Respected Contributor.
Respected Contributor.
264 views

String Comparator issues

Jump to solution

Hi all,

Am using String Comparator to do a simple check. I want to find "aaa" within "bbb,aaa,ccc,ddd" and my String Comparator is configured to have matchType "Contains" and to ignore the case. How I get "aaa" is from a HTTP Client where I filter the result and store it in a variable. Similarly, "bbb,aaa,ccc,ddd" is filtered out from a HTTP Client and stored in a variable as well. 

The problem I'm facing is that if I were to manually scan through "bbb,aaa,ccc,ddd", I can find "aaa" and i've double confirmed this by running debugger mode to copy and paste the step inputs to be stored as constants within the String Comparator. When I store as constants, the operation will return me a successful state but if I were to revert to the getting the inputs via variables. The operations won't function as expected. I know for a fact that the HTTP client outputs are not changed as I manually scan through them after to make sure that "aaa" can be found.

Thanks in advance for any help! 

David

0 Likes
1 Solution

Accepted Solutions
David_Teh Respected Contributor.
Respected Contributor.

Re: String Comparator issues

Jump to solution

After much digging realise that the way I was getting my input "aaa" with the filters applied resulted in it being saved as "\naaa". Added in another filter to trim whitespace and it was solved.

0 Likes
1 Reply
David_Teh Respected Contributor.
Respected Contributor.

Re: String Comparator issues

Jump to solution

After much digging realise that the way I was getting my input "aaa" with the filters applied resulted in it being saved as "\naaa". Added in another filter to trim whitespace and it was solved.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.