Hi,
if all you want to do is remove the '[*]' why not do:
s/^\[\*\]\s+//;
R
At 16:03 23/10/2002 -0800, Andres L. Figari wrote:
Hello,
I am having toruble getting my regex to work >:^(
The file I'm parsing for headlines looks like this
[*] headline 1
[*] headline 2
etc ...
here is my perl attempt at stripping out the [*] part of each line.
open (NEWS,$news_file) || die "cannot open news.txt: newsfile = $news_file";
while (defined ($news = <NEWS>)) {
chomp $news;
$news =~ s/^(\[\*\]) + ([^W.*])/$2/;
print "<table><tr><td valign=\"top\"><img border=\"0\"
src=\"/images/news_pt.gif\" vspace=\"4\" width=\"8\" height=\"8\"></td><td
valign=\"top\">$news<br></td></tr>";
}
close (NEWS);
Thing is my regex thingo is not working, somehow it still prints [*] with
each headline :(
Also, the [*] is used by an already working php script, so I prefer not to
alter the format of the text file. Any ideas, suggestions, tips, or advice?
Many thanks in advanced :)
Regards,
Andres
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]