Hello,
I am working with HTML files and having problem with regular expresions.
Can any one help me with this...
when using perl,
#! /usr/bin/perl
open(IN,"$ARGV[0]");
@ = <IN>;
close(IN);
chomp(@);
$list = join('',@);
$list =~ s|M||gis;
$list =~ s|\r\n|\n|gis;
$result = "<LI><a href=\"(.+?)\"><b>(.?)</b></a><br>(.?)<BR>.*?<p>";
while ($list =~ m|$result|gis) {
push (@url,"$1\n");
push (@title ,"$2\n");
push (@sumary,"$3\n");
}
print "@url\n";
print "@title\n";
print "@sumary\n";
Can any one help and tell me how to do this with PHP.
And can anyone tell me is there any good tutorial on Regular Expresions.