I want to copy and write to a file a value between two characters in a pdf file using sed or grep but can\'t work out how to do this. String I want to copy is e.g., nnnn