Samuel,
Try regular expressions and the aqString.StrMatches method.
After reading your previous message, I'd suggest that you use the following expression in your test:
welcome[ \n]*john[ \n]*\[[ \n]*Log Off[ \n]*\]
Here is an example:
Sub Test
' The string that you get in your test
checkedString = "welcome john [ Log Off ]"
' The sought-for regular expression
searchPattern = "welcome[ \n]*john[ \n]*\[[ \n]*Log Off[ \n]*\]"
' Compare strings
If aqString.StrMatches(searchPattern, checkedString) Then
Log.Message "Success"
Else
Log.Warning "Not found"
End If
End Sub