change -P to --pattern