sed already works line by line:
sed -E '/AF|PO/{ ...sed expression to apply when matching... }' server
For example, only print the lines matching that regular expression:
sed -nE '/AF|PO/p' server
The -E flag to sed makes the utility interpret the regular expression as an extended regular expression, and the -n turns off the implicit outputting of every input line.
For doing multiple things to lines matching the expression, enclose these in { ... }. For example, print each matching line twice (and don't print non-matching lines):
sed -nE '/AF|OP/{p;p;}' server