Re: pattern extraction

2004-08-17 Thread Gunnar Hjalmarsson
JupiterHost.Net wrote: Gunnar Hjalmarsson wrote: JupiterHost.Net wrote: you likely need the multi line switch. change this: my ($mso) = $row[2] =~ /(MS\d\d-\d\d\d)/i; to: my ($mso) = $row[2] =~ /(MS\d\d-\d\d\d)/si; The /s makes it match through multi lines. No, no, your understanding of the /s modi

Re: pattern extraction

2004-08-17 Thread JupiterHost.Net
Gunnar Hjalmarsson wrote: JupiterHost.Net wrote: you likely need the multi line switch. change this: my ($mso) = $row[2] =~ /(MS\d\d-\d\d\d)/i; to: my ($mso) = $row[2] =~ /(MS\d\d-\d\d\d)/si; The /s makes it match through multi lines. No, no, your understanding of the /s modifier appears to be a

RE: pattern extraction

2004-08-17 Thread Bob Showalter
Fontenot, Paul wrote: > Yes I have. The following URL's are the exact data from the database. Bottom post, please! > > I can get the MS??-??? from this URL > href="http://www.microsoft.com/technet/security/bulletin/MS03-051.asp"; > target="_default">Microsoft Security Bulletin MS03-051 > > But

Re: pattern extraction

2004-08-17 Thread Gunnar Hjalmarsson
JupiterHost.Net wrote: you likely need the multi line switch. change this: my ($mso) = $row[2] =~ /(MS\d\d-\d\d\d)/i; to: my ($mso) = $row[2] =~ /(MS\d\d-\d\d\d)/si; The /s makes it match through multi lines. No, no, your understanding of the /s modifier appears to be a misconception. It changes

Re: pattern extraction

2004-08-16 Thread JupiterHost.Net
Fontenot, Paul wrote: Yes I have. The following URL's are the exact data from the database. I can get the MS??-??? from this URL http://www.microsoft.com/technet/security/bulletin/MS03-051.asp"; target="_default">Microsoft Security Bulletin MS03-051 But not from this one. My question was to see if

RE: pattern extraction

2004-08-16 Thread Wagner, David --- Senior Programmer Analyst --- WGO
:[EMAIL PROTECTED] > Sent: Monday, August 16, 2004 4:06 PM > To: JupiterHost.Net; Fontenot, Paul > Cc: [EMAIL PROTECTED] > Subject: RE: pattern extraction > > JupiterHost.Net wrote: >> Fontenot, Paul wrote: >> >>> Ugh, I thought I was done. >>> >>&g

RE: pattern extraction

2004-08-16 Thread Fontenot, Paul
(MS\d\d-\d\d\d)/i; -Original Message- From: Wagner, David --- Senior Programmer Analyst --- WGO [mailto:[EMAIL PROTECTED] Sent: Monday, August 16, 2004 4:06 PM To: JupiterHost.Net; Fontenot, Paul Cc: [EMAIL PROTECTED] Subject: RE: pattern extraction JupiterHost.Net wrote: > Fontenot, P

RE: pattern extraction

2004-08-16 Thread Wagner, David --- Senior Programmer Analyst --- WGO
JupiterHost.Net wrote: > Fontenot, Paul wrote: > >> Ugh, I thought I was done. >> >> Why would this show the MS?-??? in either upper or lowercase > href="http://www.microsoft.com/technet/security/bulletin/MS03-051.asp"; >> target="_default">Microsoft Security Bulletin MS03-051 >> >> And this one

Re: pattern extraction

2004-08-16 Thread JupiterHost.Net
Fontenot, Paul wrote: Ugh, I thought I was done. Why would this show the MS?-??? in either upper or lowercase http://www.microsoft.com/technet/security/bulletin/MS03-051.asp"; target="_default">Microsoft Security Bulletin MS03-051 And this one would not show a value? http://www.microsoft.com/techn

RE: pattern extraction

2004-08-16 Thread Jeff 'japhy' Pinyan
On Aug 16, Fontenot, Paul said: >while (my(@row) = $sth->fetchrow_array) >{ > my $ip = $row[0]; > next if $ip == "010.041.\*"; That line will always be false. You probably mean next if $ip eq '010.041.*'; But if you really wanted to do a wildcard-like equality, you'd need a reg

RE: pattern extraction

2004-08-16 Thread Fontenot, Paul
Ugh, I thought I was done. Why would this show the MS?-??? in either upper or lowercase http://www.microsoft.com/technet/security/bulletin/MS03-051.asp"; target="_default">Microsoft Security Bulletin MS03-051 And this one would not show a value? http://www.microsoft.com/technet/treeview/?url=/tec

Re: pattern extraction

2004-08-16 Thread JupiterHost.Net
Fontenot, Paul wrote: Here is the entire script: while (my(@row) = $sth->fetchrow_array) { my $ip = $row[0]; next if $ip == "010.041.\*"; my $name = $row[1]; my $mso = $row[2](m/MS\d\d\-\d{3}/); I'd do (assuming $row[2] holds the html you gave before and $row[2] only h

RE: pattern extraction

2004-08-16 Thread Fontenot, Paul
Thanks for all the help, I'll be sure and do that from now on. -Original Message- From: Chris Devers [mailto:[EMAIL PROTECTED] Sent: Monday, August 16, 2004 12:08 PM To: Fontenot, Paul Cc: Bob Showalter; [EMAIL PROTECTED] Subject: RE: pattern extraction On Mon, 16 Aug 2004, Fon

RE: pattern extraction

2004-08-16 Thread Chris Devers
On Mon, 16 Aug 2004, Fontenot, Paul wrote: Thanks for the help. That did it, now if I could ask one more question on this. How can I make the MS portion match either upper or lower case? Add the 'i' flag to your regex: my $mso = ( $row[2] =~ (m/MS\d\d\-\d{3}/i) ); For more, look at `perldoc per

RE: pattern extraction

2004-08-16 Thread Fontenot, Paul
t, Paul Cc: [EMAIL PROTECTED] Subject: RE: pattern extraction Chris Devers wrote: > On Mon, 16 Aug 2004, Fontenot, Paul wrote: > > > Here is the entire script: > > Thanks, this is clearer. > > > while (my(@row) = $sth->fetchrow_array) > > { > ># .

RE: pattern extraction

2004-08-16 Thread Bob Showalter
Chris Devers wrote: > On Mon, 16 Aug 2004, Fontenot, Paul wrote: > > > Here is the entire script: > > Thanks, this is clearer. > > > while (my(@row) = $sth->fetchrow_array) > > { > ># ... snip ... > > my $mso = $row[2](m/MS\d\d\-\d{3}/); > > This may work better: > > my $mso = $r

RE: pattern extraction

2004-08-16 Thread Chris Devers
On Mon, 16 Aug 2004, Fontenot, Paul wrote: Here is the entire script: Thanks, this is clearer. while (my(@row) = $sth->fetchrow_array) { # ... snip ... my $mso = $row[2](m/MS\d\d\-\d{3}/); This may work better: my $mso = $row[2] =~ (m/MS\d\d\-\d{3}/); or my $mso = ( $row[

RE: pattern extraction

2004-08-16 Thread Fontenot, Paul
Here is the entire script: while (my(@row) = $sth->fetchrow_array) { my $ip = $row[0]; next if $ip == "010.041.\*"; my $name = $row[1]; my $mso = $row[2](m/MS\d\d\-\d{3}/); my @date = split/ /, $row[3]; my $severity = $row[4];

RE: pattern extraction

2004-08-16 Thread Chris Devers
On Mon, 16 Aug 2004, Fontenot, Paul wrote: 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? We wouldn't know. You didn't tell us how this data is stored before now. Are you saying

RE: pattern extraction

2004-08-16 Thread Fontenot, Paul
AM To: Fontenot, Paul Cc: [EMAIL PROTECTED] Subject: Re: pattern extraction Fontenot, Paul wrote: > If I have this: > href="http://www.microsoft.com/technet/security/bulletin/MS02-045.asp"; > target="_default">Microsoft Security Bulletin MS02-045 > > Or this

Re: pattern extraction

2004-08-16 Thread Chris Devers
On Mon, 16 Aug 2004, Fontenot, Paul wrote: Or this: http://www.microsoft.com/technet/treeview/?url=/technet/security/b ulletin/MS02-045.asp" target="_default">Microsoft Security Bulletin MS02-045 How can I get this: MS02-045 The actual pattern would be MS0?-??? where the "?" could be any number Try

Re: pattern extraction

2004-08-16 Thread JupiterHost.Net
Fontenot, Paul wrote: If I have this: http://www.microsoft.com/technet/security/bulletin/MS02-045.asp"; target="_default">Microsoft Security Bulletin MS02-045 Or this: http://www.microsoft.com/technet/treeview/?url=/technet/security/b ulletin/MS02-045.asp" target="_default">Microsoft Security Bull

pattern extraction

2004-08-16 Thread Fontenot, Paul
If I have this: http://www.microsoft.com/technet/security/bulletin/MS02-045.asp"; target="_default">Microsoft Security Bulletin MS02-045 Or this: http://www.microsoft.com/technet/treeview/?url=/technet/security/b ulletin/MS02-045.asp" target="_default">Microsoft Security Bulletin MS02-045 How can