count_items=`curl -u username:password -L "websitelink" | sed -e 's/<\/title>/<\/title>\n/g' | sed -n -e 's/.*<title>\(.*\)<\/title>.*/\1/p' | wc -l`
Above I have a Bash script that extracts the titles from an XML file, but how do I change the regex so that it extracts a title name from a div tag?
Example: extract title out of: <div id="example""><a href="">title</a></div>
I know it's silly to be done via Bash but I have no choice, any help would be appreciated.