On Wed, 2008-09-10 at 07:12 -0700, [EMAIL PROTECTED] wrote:
> Re:An the solution is.... (Score:3, Interesting)
> Re:An the solution is.... (Score:5, Informative)
> Re:Its a pity that... (Score:4, Informative)
> Re:Quick Fix (Score:4, Informative)
> Re:Quick Fix (Score:4, Insightful)
> ~
> I am matching with the pattern:
> ~
> ^Re:[^()]+\s
> ~
> All this pattern basically says (to my understanding) is "match
> everything that starts with 'Re:' and has some characters righ after".
> However I am not able to include the suffix looking like "\.\.\. \
> (Score:[1-5], \w\)$" to that pattern
Capture what you're matching and print it so that you know it does what
you think it does:
#!/usr/bin/perl
use strict;
use warnings;
while( <DATA> ){
if( /^(Re:[^()]+\s)/ ){
my $matched = $1;
print "matched : '$matched'\n";
}
}
__DATA__
Re:An the solution is.... (Score:3, Interesting)
Re:An the solution is.... (Score:5, Informative)
Re:Its a pity that... (Score:4, Informative)
Re:Quick Fix (Score:4, Informative)
Re:Quick Fix (Score:4, Insightful)
--
Just my 0.00000002 million dollars worth,
Shawn
"Where there's duct tape, there's hope."
Cross Time Cafe
"Perl is the duct tape of the Internet."
Hassan Schroeder, Sun's first webmaster
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/