pattern from file