Given a string, I need to verify that the string contains the word $LOOP strictly. For instance,
$LOOP(0,"0000","00000009","00000010",5000,100,0,0,0,0,10,0,0);
would return as true while
$LOOP_A("asdf","zxcv")
$LOOP_INIT(0);
would return as false.
The problem I’m having with string.Contains($LOOP) is that it also returns true for the below two strings.
How can I solve this problem?
Edit 1:
Here are some other examples:
$LOOPING should return false
$LOOP$LOOP should return false
$LOOP(anything here) should return true
$LOOP (Anything here) should return true
$asdLOOP should return false
What you are looking for is perhaps REGEX with Word boundary. This will do the trick