i have need webpage-content. I need to get some data from it. It looks like:
< div class=”deg”>DATA< /div>
As i understand, i have to use regex, but i can’t choose one.
I tried the code below but had no any results. Please, correct me:
regexHandler = re.compile('(<div class="deg">(?P<div class="deg">.*?)</div>)')
result = regexHandler.search( pageData )
If you want the div tags included in the matched item:
If you don’t want the div tags included, only the DATA portion:
Then to run the match and get the result: