Re: Need regexp to rejoin URL links broken by \n
- From: Tad McClellan <tadmc@xxxxxxxxxxxxxx>
- Date: Wed, 22 Jun 2005 09:36:34 -0500
Tony <hawkmoon1972@xxxxxxxxxxx> wrote:
> I have an email inside a variable $A like so:
>
> Hello, this is an
> email which has
> been formatted to
> fit a narrow
> column. Here is a
> URL: http://test.
> com/hello?test=op
> tion1&test2=optio
> n2. Thanks for
> reading.
> removes all the
> \n's between http:\\ and the next dot followed by a space
> Hello, this is an
> email which has
> been formatted to
> fit a narrow
> column. Here is a
> URL: http://test.com/hello?test=option1&test2=option2.
> Thanks for
> reading.
$A =~ s{(http://.*?)\. }
{my $s=$1; $s=~tr/\n//d; "$s.\n"}egsi;
--
Tad McClellan SGML consulting
tadmc@xxxxxxxxxxxxxx Perl programming
Fort Worth, Texas
.
- References:
- Need regexp to rejoin URL links broken by \n
- From: Tony
- Need regexp to rejoin URL links broken by \n
- Prev by Date: Re: Need regexp to rejoin URL links broken by \n
- Next by Date: Re: Activestate: how to read from a file or default to STDIN
- Previous by thread: Re: Need regexp to rejoin URL links broken by \n
- Next by thread: Re: Need regexp to rejoin URL links broken by \n
- Index(es):
Relevant Pages
|