I'm not having much luck with that :), probably using it incorrectly
though.
Is this correct:
my $mso = $row[2]( m/MS\d\d\-\d{3}/);
or am I just way wrong on this one?
-----Original Message-----
From: JupiterHost.Net [mailto:[EMAIL PROTECTED]
Sent: Monday, August 16, 2004 11:09 AM
To: Fontenot, Paul
Cc: [EMAIL PROTECTED]
Subject: Re: pattern extraction
Fontenot, Paul wrote:
> If I have this:
> <A
> href="http://www.microsoft.com/technet/security/bulletin/MS02-045.asp"
> target="_default">Microsoft Security Bulletin MS02-045</A>
>
> Or this:
> <A
>
href="http://www.microsoft.com/technet/treeview/?url=/technet/security/b
> ulletin/MS02-045.asp" target="_default">Microsoft Security Bulletin
> MS02-045</A>
>
> How can I get this:
> MS02-045
m/MS\d\d\-\d{3}/
Why did I do \d\d and \d{3} both?
because \d\d is shorter than \d{2} and \d{3} is shorter than \d\d\d plus
it illustrates two ways of doing it :)
See `perldoc perlre` for more details.
HTH :)
Lee.M - JupiterHost.Net
> The actual pattern would be MS0?-??? where the "?" could be any number
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>