|In the interest of pain and suffering:|
You can specify | as a delimiter so long as you escape it with a ^carat.
for /F "tokens=1,2* delims=^|" %%i in (%input%) do (
As for nested for loop I for one often end up counting - 1,2,3,4,5,6 opening brackets - 1,2,3,4,5 closing brackets - AHA! What fun it is....