Process Designer : Process Designer : Process Designer : Process Designer Model Tools : Search String
 

Search String

The Search String process searches for instances of one string in another. This is useful if you need to process a file differently depending on the contents of its file name, for example.

As input, Search String accepts “Input String” as the string to search through and “String to Find” as the string to search for. You can also use the “Start” property to force the process to start its search from a specific point in “Input String”.

If Search String finds any instances of “String to Find”, it outputs “Exists” as true and “Start Position” as a list of integers representing the indices in “Input String” where “String to Find” begins. If no instances are found, it outputs “Exists” as false.

For example, if “Input String” is set to 2021campaign2021-03-08a, “String to Find” is 2021, and “Start” is 0, then the process will output “Exists” as true and “Start Position” as 0 and 12. If “Start” were set to 4, then “Start Position would instead just be 12. Note that the process counts the characters in a string starting at 0.