The problem is that .* generally doesn't match across lines, but you can 
replace it with a pattern like [\s\S]* to get a multi-line pattern.

<!-- Begin Action Control bar. -->[\s\S]*?<!-- End Action Control bar. -->

That should match the header no matter how many lines long it is.

[fletcher]


> On Sep 10, 2015, at 9:37 AM, J Hall <jhal...@gmail.com> wrote:
> 
> Help!
> 
> Ok, so I'm working processing some HTML that has a lot of garbage in it that 
> I need to clean out. I'm working on an automator script because there are 
> going to be several hundred of these files that I have to go through.
> 
> So I'm trying to use the Find/Replace option in Automator to clean up all the 
> crap I don't need. I have it doing great things like removing all the </span> 
> tags. I even got it to use Grep and find all the width tags and replace 
> width="(.*)" with nothing (Since that's being controlled at the CSS level.
> 
> So, Now that I think you might have an idea of what I'm trying to pull off..
> 
> I have header and footer information that I need to kill.
> 
> The header starts with
> 
> <!-- Begin Action Control bar. -->
> and ends 150 lines later with
> <!-- End Action Control bar. -->
> 
> I have footer information that starts with
> <!-- Begin bottom list action bar. -->
> and ends 50 lines later with
> <!-- end tocCart -->
> 
> I need to build a search patter that is inclusive of the comments and takes 
> them out and everything between them.
> 
> I've been trying to do it by specifying grep in the search, but it's just not 
> working. I'm missing some detail. I'm not a Grep or RegEx person. So I'm just 
> muddling my way through. Any help would be FANTASTIC!
> 
> Please Help!
> 
> J. Hall
> 
> -- 
> This is the BBEdit Talk public discussion group. If you have a 
> feature request or would like to report a problem, please email
> "supp...@barebones.com" rather than posting to the group.
> Follow @bbedit on Twitter: <http://www.twitter.com/bbedit 
> <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 bbedit+unsubscr...@googlegroups.com 
> <mailto:bbedit+unsubscr...@googlegroups.com>.
> To post to this group, send email to bbedit@googlegroups.com 
> <mailto:bbedit@googlegroups.com>.

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" 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 bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.

Reply via email to