Thank you James, it works! I don't know what I was doing wrong before but I am sure I tried using the backslash before posting this message.
"james bejon" <email@example.com> wrote in message <firstname.lastname@example.org>... > I don't have Matlab to hand, so can't test this. But you may need escape characters in front of your literal pipes, i.e. (&&)|(\|\|)