Thanks to all who replied. I was able to do this with an Applescript
and it wasn't as hard as I feared.  I may also check out text
factories for other projects like this.
The Unix solution seems elegant, but unfortunately, way beyond my
limited grep capabilites.

Thanks again,

John


On Jul 27, 6:07 pm, John Delacour <johndelac...@gmail.com> wrote:
> 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 bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
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 "supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

Reply via email to