I then try to read if the string contains “Standard place1” but when I write it simply like this with a space in between the bot doesn’t enter that if statement.
inputString = "Standard\t\nplace1\t\nname surname\t\nplace2\t\nplace3"
searchString = "Standard place1"
// Trim whitespace and line breaks
inputString = inputString.Replace("\t\n", " ").Trim
searchString = searchString.Trim
// Perform a case-insensitive comparison
If inputString.ToLower.Contains(searchString.ToLower)
// Your code here if the condition is met
Else
// Your code here if the condition is not met
the string contains a tab and a new line, it is not physically written when I display the string in a message box it looks like this
so using Replace(“\t\n”," ") is not helping
when \t\n are copy pastes from e.g. debugging panels and representing a proper tab or line break we can use isMatch / Regex.Match for a defensive check:
strText = your Text
strPattern = "Standard[\s]*?place1"