Does not contain certain characters

I’m trying to check to makes sure that an item does not contain certain characters. I see the contains function, is there one for does not contain, or is there a way to alter this?

Hi @DavidV32,

To check the text present in the string String_variable.contains(“abc”)
And use not keyword to check does not contain.



So what I am trying to do is run a double check. That check for invalid characters and make sure that other characters do exist. So in this example I want to check that gmail does exist, but that .com does not. If either is true then they will be marked as invalid. Here is roughly what I have:
NewEmailText.contains(lcase(item.ToString)) OR NewEmail.ToString.Contains(".com")
Obviously this is just going to see if both do exist, I;m not sure how to add in the not keyword.

NewEmailText.contains(lcase(item.ToString)) OR NOT NewEmailText.Contains(".com")

do you mean like this?

1 Like