"Christopher S. Penn" <[email protected]> sez: >I have two files, A and B, with lists of plain text in each: > [examples elided] > >How do I REMOVE from List A anything that appears in List B? Text >Factory? Advanced Search?
Here's one method (which is easier to actually do than it may first appear :-) * make a copy of file B * use Text -> Prefix/Suffix Lines to add a suffix of "*" (a bullet character, type Option-8 [1]) to each line of the copied file * copy the modified contents of file B * paste into file A (make sure to start the paste on a new line) * apply Text -> Process Duplicate Lines, "Matching All" and with "Delete duplicate lines" and "Match using pattern" set, with Searching pattern: ^([^*]+).*$ Match using: Specific sub-patterns: \1 * apply Text -> Process Lines Containing, with "Delete matched lines" set and specify "*" [1: To process text containing bullet chars, just pick & use some other locally-unique character instead.] Regards, Patrick Woolsey == Bare Bones Software, Inc. <http://www.barebones.com> P.O. Box 1048, Bedford, MA 01730-1048 -- You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/bbedit?hl=en If you have a feature request or would like to report a problem, please email "[email protected]" rather than posting to the group.
