Is there any way to recognize line changing in string?

Hello

StrVar1=
“Apple
Orange
Mango”

StrVar2=
“AppleOrangeMango”

Is there any way to recognize they are not same?

@Golf_Aquascape

I believe if you do strVar1=strVar2 you will get false.please try the same in if condition …it would go to else side

Cheers

Hi @Golf_Aquascape,

System.Text.RegularExpressions.Regex.IsMatch(yourString,“(?=\w+).*(?=\n)”)

above code will return false for “AppleOrangeMango” and true for "Apple\nOrange\nMango.

Hope it helps!

Thanks!

Ok Thanx. will check

2 Likes

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