At 10:03 -0700 27/07/2011, jgold723 wrote:

I'm using BBEdit 8 (but willing to upgrade if necessary). I have a
series of search and replace strings that I need to perform on a
document. I'd like to build these once, then have BBEdit run them all
on the document. Can that be done? How?

The easiest way is to create a UNIX Filter (renamed Text Filter in BBE 10)

Here is a filter that will capitalize all a, e and o in the document. I have writen it in such a way that the whole text of the document is treated as a unit rather than read line by line

#!/usr/bin/perl
my $wholetext = "";
while (<>) {
  $wholetext .= $_
}
$_ = $wholetext;
# Substitutions:
s/a/A/g; #1
s/e/E/g; #2
s/o/O/g; #3
print;

JD


--
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.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

Reply via email to