Compare

hi i am extraction some address from pdf and i have address as an input how to compare that

i tried in if condition its is failing even when they are same also remove extra white spaces

Hi @manoj_verma1

In if condition use the syntax as

Inputvariable.tostring.tolower.contains(Extractedvariable.tostring.tolower)

or else if you want you can use this syntax too

Inputvariable.tostring.tolower.trim.Equals(Extractedvariable.tostring.tolower.trim)

Regards

Hi @manoj_verma1 ,

Can you send us the error screenshot and how the address look like?

@manoj_verma1

Str_PdfText.ToString.Trim.Equals(“YourInput”).ToString.Trim

the address has first line of address, city state and zip @Manish540

Could you share an example of the data

@vrdabberu @lrtetala @rlgandu @Manish540 @Quenton_Wayne_Rebello
i have country now sometimes its coming as this way United States states in new line how deal with this

@manoj_verma1

Try this

Country.ReplaceLineEndings(" ")

image

If it is not in new line also it works

image

I hope it helps!!

i am not getting this fnction ReplaceLineEndings
@lrtetala only replace is coming

@manoj_verma1

Variable must be String

@lrtetala i have the value from array like Country(2)

@manoj_verma1

Can you show the workflow

its like i have a string then i have split it with , and then at index i am getting that value as United
states
@lrtetala

Hey @manoj_verma1 ,
Try this Country(2).Replace(Environment.NewLine,“”)

Hi @manoj_verma1 ,

We would recommend you to add breakpoints after the extraction and then compare the values using the Debug Immediate Panel.

You could understand why the data is not a match from there. This way we will be able analyse faster and come to a conclusion on the suggestion.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.