in reply to Regex to detect and remove a linebreak in an URL
would be good enough? If they cross multiple line boundaries, you'd need to keep a flag, like:/http:\S*[^\w\s]/g and s/\G\n//;
But a lot of URLs end in slashes, and it would be perfectly reasonable to see (in mail):/http:\S*[^\w\s]/g and s/\G\n// and $http=1; $http and /^\S*[\w\s]/g and s/\G\n// or $http=0;
and the processor would join the "and" line onto the end of the URL.Check out http://homestarrunner.com/sbemail/ and let me know what you think
Update: Oops, forgot the /g modifier on the pattern matches, so the \G didn't work.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Regex to detect and remove a linebreak in an URL
by Abigail-II (Bishop) on May 19, 2004 at 19:43 UTC | |
by Roy Johnson (Monsignor) on May 19, 2004 at 20:02 UTC | |
by Anonymous Monk on May 20, 2004 at 00:49 UTC | |
by Roy Johnson (Monsignor) on May 20, 2004 at 01:50 UTC |