Perfect, thanks...
What is the difference in Bbedit of a filter or a script?
To add one final mod to this, to replace < and > with nothing, how would I
do that?
> The use of angle-brackets definitely helps, it would be a pain to
> do this without them. Here's a way to rewrap the URLs with grep (assuming
> that the URLs aren't wrapped onto 3 or more lines).
>
> Find
>
> <(https?:.*?)(?:\r(.*))?>
>
> Replace
>
> <\1\2>
>
>
> For the second part, you'll want to use a script of some kind, because the
> original URL needs to be URL-encoded if it's going to be used in the query
> string.
>
> Here's a Perl script that does both tasks. It fixes URLs wrapped over any
> number of lines.
>
> #!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__
--
-------------------------------------------------------------
Scott Haneda Tel: 415.898.2602
<http://www.newgeo.com> Novato, CA U.S.A.
--
------------------------------------------------------------------
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]>