text processing on web pages
Hello Everyone, I've got what I suspect to some of you will seem a trivial problem, but I'm not good with Perl, regular expressions, or pattern matching which is what I'm suspecting this one is going to take, though time wise running it should be quick enough. Here's the situation. I need to look at various files for the web, in this case css style sheet files, in them they have styles not used on any page so I want to remove the style in question. I've got several style sheet files, several sites to do this to, and several pages though a majority of them are quite similar. For example, some sheets have the <blockquote> tag in it, and a style set up for that. What I want to do is take each individual style I'll use blockquote and scan the pages of the site, if that isn't found on any page remove it from the sheet. The hard part comes in when dealing with contextual selectors and classes, but the same thing, scan each page for the contextual selector, ID, or class in question from the sheet, if found even on one page out of the whole site leave it alone, if no pages have that particular item remove it. I need this done for all pages, all sheets, and all sites. I can do this, if someone can get me started, and would be willing to help out with questions as I'm sure there will be some, I've tried reading about Perl regular expressions and my head hurts. Any assistance appreciated. Thanks. Dave.
participants (1)
-
David Mehler