On Oct 30, 2016, at 2:58 AM, Vlad Ghitulescu <v...@ghitulescu.de> wrote:
> I'm searching for a couple of things:
> I would like to delete all of the "(Viewed)" - words (after the name of the 
> chapters).
> I would like to delete all the "Video" - words before the duration of each 
> chapter.
> I would like to concatenate the lines containing the name of the chapters 
> with their duration.
> That will make from this 2 lines
> 
> Be consistent (and organized) (Viewed)
> Video 1m 9s
> 
> this line:
> 
> Be consistent (and organized) 1m 9s
> 
> And finally:
> 
> I would like to delete all the lines saying "Save <name of chapter>".
> How would you do all of this in an elegant, efficient (= BBEdit ;-) way
> 


BBEdit has a Replace All option in the Find & Replace dialog.

Is it always the case that these three lines occur together? I.e., is "... 
(Viewed)" always followed by "Video ...", always followed by "Save ..."?
If these three items don't appear independently, then the entire operation can 
be accomplished in one Find & Replace All step:

Find : \(Viewed\)\nVideo (.*)\nSave .*$
(Grep)
Replace: [empty]

This works on your example text, except the "Save" line is missing from the 
last video.
If the three changes appear together, than separate Find & Replace All steps 
should work

-- 
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.
Visit this group at https://groups.google.com/group/bbedit.

Reply via email to