Indeed much better to check the result of the
split operation, than to use an extra regex to check for "|". If you do need a separate check a test based on
index is probably less resource intensive and faster. I didn't test it, but no doubt someone will put together a benchmark shortly.
CountZero
"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law