in reply to Continue reading regex to next line
#!/usr/bin/perl use strict; while (<DATA>) { my $line; ($line) = $_ =~ m|\w+.*\s(http://\w+.*\.html\s)\w+.*|; print "$line\n"; } __DATA__ This is a test this is a test test test http://www.website.com/getme.h +tml this is test this is a test This is a test this is a test test test http://www.website2.com/getme. +html this is test this is a test This is a test this is a test test test http://www.website3.com/getme. +html this is test this is a test This is a test this is a test test test http://www.website4.com/getme. +html this is test this is a test
|
|---|