Print lines which contain a set of characters in sed
sed -n '/[dwp]/p' /etc/passwd
You can also put a string range like in regex:
sed -n '/[a-d]/p' /etc/passwd