Maybe the following program helps you debug the regex:
#!perl -w use strict; # use Regexp::Debugger; for my $line (<DATA>) { while ( $line=~/<a href=\"(.*?)\.htm\">/ig ) { print "$1\n"; }; } __DATA__ <a href="test1.htm"> test1</a><br> <a href="test2.htm"> test2</a><br>< +a href="test3.htm"> test3</a><br>
For me this outputs:
test1 test2 test3
In reply to Re^3: regex not matching how I want it to :(
by Corion
in thread regex not matching how I want it to :(
by glwa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |