First, "class='day_report'" isn't a named div. Second, if you are validating to HTML5, you would use ID instead of NAME. Third, using either ID or NAME, there should be only one of them on the page.
Per Jan Erik's post, you don't say if you are trying to do this locally on files on your hard drive or remotely on files on the server. If you are trying to delete on the server after the page is built (!), not being a JavaScript guru I would either use jQuery to set the contents of the div to nothing, or add a scrap of CSS to kill the display of that div. On Saturday, October 28, 2017 at 9:07:49 AM UTC-7, jgill wrote: > > I can do this in BBEdit and I can do it easily with Applescript, because > it can search backwards for (?s)<div class="day_report">.*?</div> - but how > can I search backwards with JavaScript? I want to be able to delete the > last instance of this div on a web page. > > Also, can I run JavaScript from within BBEdit on the front window instead > of AppleScript? > > TIA > -- This is the BBEdit Talk public discussion group. If you have a feature request or would like to report a problem, please email "[email protected]" rather than posting to the group. Follow @bbedit on Twitter: <http://www.twitter.com/bbedit> --- You received this message because you are subscribed to the Google Groups "BBEdit Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/bbedit.
