Thanks so much! This did the trick. I've been familiarizing myself with 
multi-file search and am very excited to now have such a powerful tool to 
use for these repetitive tasks. Hoping to learn more about grep as well as 
Text Factory

On Monday, October 10, 2022 at 4:46:33 PM UTC-5 fletc...@cumuli.com wrote:

> The find pattern would be "<iframe.*?</iframe>" with "Grep" checked. You 
> can use the Multi-File Search... dialog to run this against a folder 
> containing your .txt files to see how many matches there are.
>
> When I'm doing multi-file work like this I'll usually start out doing a 
> Find All in the multi-file dialog and looking at all the results. If it 
> looks like I want to do a replace all then I can go back into the dialog 
> and do that. The replace pattern would be blank if you want to remove the 
> iframe tags.
>
> If I need to be more discerning I'll work through each file by file in the 
> results using Find Next to make sure that I want to replace all the 
> iframes. Or refine the find pattern to be more specific.
>
> [fletcher]
>
>
> On Oct 10, 2022, at 2:22 PM, a k <kw0...@gmail.com> wrote:
>
> Hey all, 
>
> I'm looking to use grep to remove text contained within a tag (including 
> the tag itself). More specifically - I need to find and remove a bunch of 
> iframe tags from multiple .txt files. 
>
> Here's an example tag:
>
> *<iframe 
> src="https://website.com/1.0/ifr?zid=123456&cb=${CACHEBUSTER}&abc_imp=${AUC_ID}&c=${CLICK_URL_ENC}&;
>  
> <https://website.com/1.0/ifr?zid=123456&cb=$%7BCACHEBUSTER%7D&abc_imp=$%7BAUC_ID%7D&c=$%7BCLICK_URL_ENC%7D&;>"
>  
> frameborder="0" scrolling="no" width="123" height="456"></iframe>*
>
> because the zid, width and height always differ and appear in other places 
> in the document (that need to be preserved) I cant do a regular find and 
> replace.
>
>  a complete beginner to BBEDIT and grep so apologies if this question is a 
> bit remedial. I have bunch of code cleanup tasks that are very repetitive 
> and I'm confident could be solved with grep, just not 100% sure how to go 
> about it.
>
> -- 
> This is the BBEdit Talk public discussion group. If you have a feature 
> request or need technical support, please email "sup...@barebones.com" 
> rather than posting here. Follow @bbedit on Twitter: <
> https://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+un...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/bbedit/ba2bdebc-1e4e-4849-ad21-bfea60bd00e4n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/bbedit/ba2bdebc-1e4e-4849-ad21-bfea60bd00e4n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "supp...@barebones.com" rather than 
posting here. Follow @bbedit on Twitter: <https://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 view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/14bb00e7-7ea5-4a3a-8a89-4255ccfa927bn%40googlegroups.com.

Reply via email to