#!/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
In reply to Re: Continue reading regex to next line
by bichonfrise74
in thread Continue reading regex to next line
by learningperl01
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |