e inspectors for the examination and search of persons of their own sex; and all persons coming into the United States from foreign countries shall be liable to detention and search by authorized officers or agents of the government, under such regulations as the Secretary of the Treasury shall from time to time prescribe: Provided, That no railway car or engine or other vehicle, or team used by a