Use the Find dialog and turn on the "Grep" switch... 1) I have questions about this one. Are the lines to be kept and the lines to be deleted always alternating? (e.g. there's always one to be kept, always followed by one and only one to be deleted?) If not, I'd probably do this one in two steps (first delete the hash lines and the deletable lines, and then just go through and delete all the ampersands, so, use the same expression as #2, and then do another search and replace for &&&\n). (And I just saw that Sam mentions the same strategy. I started this email an hour ago.)
2) ###\n.*?\n --Kerri On Wed, May 2, 2018 at 1:26 PM Matthew London <[email protected]> wrote: > Hi, > I have a file with the following: > > > &&& > TEXT STRING I WANT TO KEEP > ### > TEXT STRING I WANT TO DELETE > &&& > TEXT STRING I WANT TO KEEP > etc, > where there is a linebreak after &&&, ###, and all text strings > > > I need to process this text in two different ways; > > 1) > I would like to remove ALL of the following: > ### > TEXT STRING I WANT TO DELETE > &&& > > > So the result is: > TEXT STRING I WANT TO KEEP > TEXT STRING I WANT TO KEEP > TEXT STRING I WANT TO KEEP > > > > 2) > I would like to remove ONLY the following: > > ### > TEXT STRING I WANT TO DELETE > > So the result is: > > &&& > TEXT STRING I WANT TO KEEP > &&& > TEXT STRING I WANT TO KEEP > &&& > TEXT STRING I WANT TO KEEP > etc. > > Grateful for suggestions on how to do this. > Thank you. > > -- > 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. > -- 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.
