No, you can't get herpes from pettiing a dog whose owner has herpes. I think your question shows a lack of understanding of the prevalence and spread of herpes. Most adults have oral herpes, which causes cold sores. It is spread through skin-to-skin contact. You are far more likely to get herpes from kissing your relatives at Thanksgiving than from anything else.