Capture any character in Code Block string

I’m trying to filter a List, basically put all the codes with “ECNC /” into an 'in list" regardless of the characters after the ‘/’ symbol. Is there an easy way to capture this in a code block? I cannot just use the asterisk (*) symbol like you would anywhere else… any ideas?

Try String.Contains or get the first few characters of the string if ECNC/ is always at the beginning.

1 Like

Use String.Contains

2 Likes

@Nick_Boyts beat me to it :slight_smile:

Thank you!

Thank you, too!

So… is there a way to searchFor more than 1 string in a code block? I want to search for anything that has NG/ and ECNC/… or do I have to duplicate these nodes to change 1 code block?

There are a few ways to go about the specifics, but in general you can search for each subtring (either with a list or separately) and then see if either result is True (either with ListContains True or an OR condition.)

1 Like