Need regexp to rejoin URL links broken by \n
- From: "Tony" <hawkmoon1972@xxxxxxxxxxx>
- Date: 22 Jun 2005 02:15:15 -0700
Hi regular expression experts.
Can someone help me with a regular expression that removes \n's from
the middle of URL's?
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.
As you can see, the link has been wrapped into the column by a number
of \n's. Obviously, this means the link can't be clicked on.
I'd like to pass this through a regular expression that removes all the
\n's between http:\\ and the next dot followed by a space (that is:
'. ')
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.
Any ideas?
Thank you!
(And are there any tools to help construct and test regular
expressions?)
.
- Follow-Ups:
- Re: Need regexp to rejoin URL links broken by \n
- From: Martien Verbruggen
- Re: Need regexp to rejoin URL links broken by \n
- From: Tad McClellan
- Re: Need regexp to rejoin URL links broken by \n
- From: Greg Bacon
- Re: Need regexp to rejoin URL links broken by \n
- Prev by Date: Re: [OT] Re: "use CGI " hangs "CGI time out "
- Next by Date: FAQ 6.7 How can I match a locale-smart version of "/[a-zA-Z]/"?
- Previous by thread: FAQ 1.11 When shouldn't I program in Perl?
- Next by thread: Re: Need regexp to rejoin URL links broken by \n
- Index(es):
Relevant Pages
|