Re: regex ( i suck at them)

2002-10-24 Thread Nigel Wetters
On Thu, 2002-10-24 at 13:04, I wrote: > $news =~ s/^\[\*\] (.*)$/$1/; sorry, this is probably better $news =~ s/^\[\*\] //; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: regex ( i suck at them)

2002-10-24 Thread Robin Cragg
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

Re: regex ( i suck at them)

2002-10-24 Thread Nigel Wetters
On Thu, 2002-10-24 at 01:03, Andres L. Figari wrote: > [*] headline 1 > [*] headline 2 ok > $news =~ s/^(\[\*\]) + ([^W.*])/$2/; This won't match, and thus no substitution will happen. try: $news =~ s/^\[\*\] (.*)$/$1/; -- Nigel Wetters, Senior Programmer, Development Group Rivals Digital M

regex ( i suck at them)

2002-10-24 Thread Andres L. Figari
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"; wh