I'm not sure what you mean by "copy". I'm assuming you want to create a new file containing just the matching lines. There is a very simple solution using FINDSTR with regular expressions. Each regex looks for the ID in the 2nd column, and allows any number of spaces (including 0) before and after the ID.
findstr /rb /c:"[^|]*| *12 *|" /c:"[^|]*| *56 *|" "file.txt" >"newFile.txt"
Update: 2015-12-20
FINDSTR has very primitive and totally non-standard regex support. Lack of alternation forces each number alternative to require the entire regex. This can be a problem if you are searching for many more alternatives.
There is a much simpler solution using my JREPL.BAT regex text processing tool. It is pure script (hyrid JScript/batch) that runs natively on any Windows machine from XP onward.
call jrepl "^[^|]*\| *(12|56) *\|.*" $0 /jmatch /f "test.txt" /o "newFile.txt"
It is a simple matter to add additional pipe delimited numbers to search for within the parentheses.