How to find information inside a xml tag using grep?

hakk3r

New Member
I am working on a linux shell script to find information in a xml file using \[code\]grep\[/code\]. I am on a mac which I hope doesn't matter too much.To find the information I need, I run: \[code\]grep -oP "<title>(.*)</title>" temp.xml\[/code\]I get in return a list of matches and this includes the \[code\]<title>\[/code\] tag.How can I get a list with only the information inside the \[code\]title\[/code\] tag but without the \[code\]title\[/code\] tag using grep?
 
Back
Top