Most efficient grep method

view story

http://unix.stackexchange.com – Currently I am grepping data from a file containing any of the following: 342163477\|405760044\|149007683\|322391022\|77409125\|195978682\|358463993\|397650460\|171780277\|336063797\|397650502\|357636118\|168490006............... This list is longer and contaings ~700 different values. What is the most efficient way of extracting it? I can chop it in parts of 10/20/50/100... Or are there other unix methods? This grep is piped to python for further analysis which goes fast enough. (HowTos)