Regex help with Google Page Monitor extension
I'm trying to monitor a small section of a web page for changes using the the Google Page Monitor extension -- https://chrome.google.com/extensions/detail/pemhgk开发者_StackOverflowlkefakciniebenbfclihhmmfcd
Under advanced settings I can use either Regex or Selectors to accomplish this, but need help with this. In the following html, I'd like to monitor the following for changes in either the URL in line 4 or the text in line 5. Any pointers gratefully accepted.
<div id="rtBtmBox"><div id="sectHead" style="margin-bottom:5px;">
<h3>SLJ's Pick of the Day</h3></div>
<p align="center">From the March issue</p>
<p align="center"><a target="_blank" href="http://www.schoollibraryjournal.com/article/CA6723937.html">
<font color="#0000ff"><strong><em>The Summer I Turned Pretty</em></strong><br/>
Awesome, to find a question about my own extension on the front page of StackOverflow.
Anyway, it's easier using a selector. This should do the job: #rtBtmBox p:nth-child(3)
. However, if that paragraph has more contents, you might need something different (post or link the whole page if so).
A regex that will probably work is: <div id="rtBtmBox">[^]*?<a target="_blank" href="([^"]+)"
精彩评论