Thanks for the fix.
For the record, I was trying to do something like this:
separator_index=$input[(i):]
if [[ $separator_index -le $#input ]]; then
# Found separator
...
fi
Currently, an empty input incorrectly triggers the conditional code. To avoid it, an extra condition for that specific case is required, which is rather annoying.
In the code above, an alternative would be to use (I) and test against 0, which works in all cases, but it feels wrong in my code where I also need the index of the first separator.
Philippe