// Edit this list with what you don't want NOT_ALLOWED_LIST = list("ABC", "123", "FOO", ".pdf") NOT_ALLOWED_LIST_NAME = "NOT_ALLOWED_LIST" source_string = inquireText("Enter something to be filtered:") // Begin searching for not-allowed strings for not_allowed_index = 1 to NOT_ALLOWED_LIST.size repeat // Get the first not-allowed string to check this_not_allowed_str = getParameterNamed(NOT_ALLOWED_LIST_NAME, not_allowed_index) this_not_allowed_len = len(this_not_allowed_str) // Attempt to find the not-allowed string // - if found, will be non-zero // - if not found, will be zero attempt = inStr(source_string, this_not_allowed_str) // If the not allowed string was found, // - from: the start of the original string (1) // - to: the attempt index (minus 1 to not include the 1st character) // - PLUS // - from: attempt index + the length of the search string // - to: the end of what remains if attempt <> 0 then source_string = subStr(source_string, 1, attempt - 1) + mid(source_string, attempt + this_not_allowed_len) endif until attempt == 0 // repeat for all not-allowed strings next not_allowed_index // Output display(source_string)