On Mon, Aug 13, 2007 at 03:53:16PM -0700, Scott Haneda wrote:
>
> What is the difference in Bbedit of a filter or a script?
I hope this description is accurate... :)
A filter takes the current selection as input, and replaces that selection
with its output.
A script doesn't have any default input. If there is any output, it
appears in a new window.
> To add one final mod to this, to replace < and > with nothing, how would I
> do that?
To remove the angle brackets, just take them out of the replacement in the
second regex:
s{<(https?://[^/]+/)(?!index\.html\?jump=)(.*?)>}
{"$1index.html?jump=" . uri_escape($2)}ge;
Ronald
> > #!perl
> >
> > use warnings;
> > use strict;
> >
> > use URI::Escape;
> >
> > local $/;
> >
> > $_ = <>;
> >
> > # fix line-wrapped URLs
> > s/<(https?:.*?)>/my $url = $1; $url =~ tr,\n,,d; "<$url>"/sge;
> >
> > # add index.html?jump= to URLs that don't already have it
> > s{<(https?://[^/]+/)(?!index\.html\?jump=)(.*?)>}
> > {"<$1index.html?jump=" . uri_escape($2) . '>'}ge;
> >
> > print;
> >
> > __END__
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <[EMAIL PROTECTED]>