form the correct search string for egrin2.js