______________________________________________________________________
Hey Randy,
You say some files, so I imagine you might want to automate the process a bit.
Of these the Perl filter is fastest on a really big file (above 50K lines).
----------------------------------------------------------------------
RegEx Find/Replace using Positive Lookahead Assertion
----------------------------------------------------------------------
Find:
^.+?(?=>)
Replace:
Nothing
----------------------------------------------------------------------
AppleScripted RegEx Find/Replace
----------------------------------------------------------------------
tell application "BBEdit"
tell front text window's text
replace "^.+?(?=>)" using "" options {search mode:grep, case sensitive:false, starting at top:true}
end tell
end tell
----------------------------------------------------------------------
Perl Text Filter
----------------------------------------------------------------------
#! /usr/bin/env perl
use v5.010; use strict; use warnings;
while (<>) {
if ( m!^.+?(?=>)(.+)! ) {
say $1;
} else {
print;
}
}
----------------------------------------------------------------------
To quickly get to your text filter folder if you haven't used it before paste the following line into a BBEdit worksheet or the Terminal and run.
D=~/'Library/Application Support/BBEdit/Text Filters/'; mkdir "$D" > /dev/null 2>&1; open "$D";
--
Best Regards,
Chris