Railway police detains 40 in combing operations