On Apr 12, 2015, at 22:27, Claira Monica <[email protected]> wrote:
> First, when I use "Process Lines Containing", when I click on the "Options"
> button, the only checkbox that is active in the lower area is "Delete matched
> lines"...
______________________________________________________________________
Hello Claira,
By design I believe.
> Secondly, what I really want to do is _keep_ only the lines that contain a
> given phrase, not _remove_ them...how can I do that?
Use an AppleScript or a Text-Filter.
AppleScript:
-------------------------------------------------------------------------------------------
tell application "BBEdit"
tell text of front text window
set foundLines to copied lines of (process lines containing matching string
"Shane +S.+" with matching with grep)
set its contents to foundLines
end tell
end tell
-------------------------------------------------------------------------------------------
Text Filter:
#! /usr/bin/env perl
use strict; use warnings;
#----------------------------------------
while (<>) {
if ( m!Shane +S.+!i ) { print; };
}
--
Best Regards,
Chris
--
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].