Javascript extraction

2010-10-16 Thread bones288
Hello, I'm looking to read the counter at: http://www.costofwar.com/ But the get() function will only extract the html code of the page and not the dynamic javascript. Do you know how I can read the counter in perl? Thanks, Bones -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For

Re: Out of Memory error with large Oracle DB extraction

2009-11-25 Thread Rene Schickbauer
Hi! I've done a lot of DBD::Oracle programming for over 10 years and never met a situation where I needed to do that. I can safely say that your program will be better off for using some sort of while ( ...->fetch ) loop. I also use DBD::Oracle in one of my projects (ActivePerl 5.10). I get

Re: Out of Memory error with large Oracle DB extraction

2009-11-19 Thread Peter Scott
On Thu, 19 Nov 2009 01:07:25 -0700, Dan Fish wrote: > I'm working on a project that requires some rather large extractions > from an Oracle DB (about 2 million rows) and while monitoring the task > manager, I get an "Out of memory error" at about 2GB of mem usage. [...] > Is there a built-in way to

Re: Out of Memory error with large Oracle DB extraction

2009-11-19 Thread Rob Coops
On Thu, Nov 19, 2009 at 9:07 AM, Dan Fish wrote: > I'm working on a project that requires some rather large extractions from > an > Oracle DB (about 2 million rows) and while monitoring the task manager, I > get an "Out of memory error" at about 2GB of mem usage. > > > > Client System Specifics:

Out of Memory error with large Oracle DB extraction

2009-11-19 Thread Dan Fish
I'm working on a project that requires some rather large extractions from an Oracle DB (about 2 million rows) and while monitoring the task manager, I get an "Out of memory error" at about 2GB of mem usage. Client System Specifics: Win 2K3 Server 32-Bit SP2 Intel Xeon 2.5Ghz 8 CPU w/4GB

Re: Including the carriage return in extraction

2008-06-16 Thread Dr.Ruud
Gunnar Hjalmarsson schreef: > I don't > see how the fact that you posted it would motivate your introducing of > non-greediness in the first suggestion. I injected the "non-greediness" for educational reasons. It was a bit wasted on the OP, who couldn't find his way in perlre. My experience is th

Re: Including the carriage return in extraction

2008-06-16 Thread Gunnar Hjalmarsson
Dr.Ruud wrote: Gunnar Hjalmarsson schreef: Dr.Ruud: Ravi Malghan: I want to extract data between the first parenthesis and the last in the below variable. $OrigString = "REQUEST(SERVICE,1DJGHKDFJGHDFJGHKDFJH\nDFJHGDFJHGJDFHGJKDFHG\nHGJDFHGJK DFHGJKDFHGJKDFH);"; $OrigString =~ m/REQUEST\(

Re: Including the carriage return in extraction

2008-06-16 Thread Dr.Ruud
Gunnar Hjalmarsson schreef: > Dr.Ruud: >> Ravi Malghan: >>> I want to extract data between the first parenthesis and the last >>> in the below variable. > > > >>> $OrigString = >>> "REQUEST(SERVICE,1DJGHKDFJGHDFJGHKDFJH\nDFJHGDFJHGJDFHGJKDFHG\nHGJDFHGJK >>> DFHGJKDFHGJKDFH);"; >>> $OrigString =~

Re: Including the carriage return in extraction

2008-06-16 Thread Gunnar Hjalmarsson
Ravi Malghan wrote: I read up some docs on perlre. I know what .* does. But couldn't figure out what does .*? does. That's also explained in "perldoc perlre". Look for "greedy" and "greediness" in the section "Quantifiers". (But it's unnecessary in this case IMO.) Also in the variant you su

Re: Including the carriage return in extraction

2008-06-16 Thread Gunnar Hjalmarsson
Dr.Ruud wrote: Ravi Malghan schreef: I want to extract data between the first parenthesis and the last in the below variable. $OrigString = "REQUEST(SERVICE,1DJGHKDFJGHDFJGHKDFJH\nDFJHGDFJHGJDFHGJKDFHG\nHGJDFHGJK DFHGJKDFHGJKDFH);"; $OrigString =~ m/REQUEST\((.*)\);/; print "$1\n"; Read

Re: Including the carriage return in extraction

2008-06-16 Thread Ravi Malghan
.Ruud <[EMAIL PROTECTED]> To: beginners@perl.org Sent: Sunday, June 15, 2008 8:55:31 PM Subject: Re: Including the carriage return in extraction Ravi Malghan schreef: > Hi: I want to extract data between the first parenthesis and the last > in the below variable. I have tried a numbe

Re: Including the carriage return in extraction

2008-06-15 Thread Dr.Ruud
Ravi Malghan schreef: > Hi: I want to extract data between the first parenthesis and the last > in the below variable. I have tried a number of combinations. I > either miss the entire string or get data only until the first > carriage return. Can someone help me to extract the data including > th

Including the carriage return in extraction

2008-06-15 Thread Ravi Malghan
Hi: I want to extract data between the first parenthesis and the last in the below variable. I have tried a number of combinations. I either miss the entire string or get data only until the first carriage return. Can someone help me to extract the data including the carriage return between the

SHA1 Vector Extraction Problem

2007-08-06 Thread Idgarad
I am working on a bit of a issue and I am hoping to find some guidance. Here is what I need to to: I need to generate 2 SHA1 hashes (easy) based on an objects name and it's DB id. This is Easy so far and I have that down. I get 2 unique SHA1 hashes stored. Now depending on what I am doing I onl

Re: regex extraction problem

2006-05-28 Thread John W. Krahn
Chad Perrin wrote: > On Sun, May 28, 2006 at 03:08:07PM -0700, John W. Krahn wrote: >>tom arnall wrote: >>>On Sunday 28 May 2006 12:20 am, John W. Krahn wrote: tom arnall wrote: >the following code: > > $_='abcd'; > @f = /(x)(y)|(a)(b)/; > >makes the first two cells

Re: regex extraction problem

2006-05-28 Thread Chad Perrin
On Sun, May 28, 2006 at 03:08:07PM -0700, John W. Krahn wrote: > tom arnall wrote: > > On Sunday 28 May 2006 12:20 am, John W. Krahn wrote: > >>tom arnall wrote: > >>>the following code: > >>> > >>> $_='abcd'; > >>> @f = /(x)(y)|(a)(b)/; > >>> > >>>makes the first two cells of '@f' to be undefi

Re: regex extraction problem

2006-05-28 Thread John W. Krahn
tom arnall wrote: > On Sunday 28 May 2006 12:20 am, John W. Krahn wrote: >>tom arnall wrote: >>>the following code: >>> >>> $_='abcd'; >>> @f = /(x)(y)|(a)(b)/; >>> >>>makes the first two cells of '@f' to be undefined, then puts 'a' and 'b' >>>in the third and fourth cells. how do i get the

Re: regex extraction problem

2006-05-28 Thread tom arnall
On Sunday 28 May 2006 12:20 am, John W. Krahn wrote: > tom arnall wrote: > > the following code: > > > > $_='abcd'; > > @f = /(x)(y)|(a)(b)/; > > > > makes the first two cells of '@f' to be undefined, then puts 'a' and 'b' > > in the third and fourth cells. how do i get the system to put 'a

Re: regex extraction problem

2006-05-28 Thread John W. Krahn
tom arnall wrote: > the following code: > > $_='abcd'; > @f = /(x)(y)|(a)(b)/; > > makes the first two cells of '@f' to be undefined, then puts 'a' and 'b' in > the third and fourth cells. how do i get the system to put 'a' and 'b' in the > first two cells and to produce no un

regex extraction problem

2006-05-27 Thread tom arnall
the following code: $_='abcd'; @f = /(x)(y)|(a)(b)/; makes the first two cells of '@f' to be undefined, then puts 'a' and 'b' in the third and fourth cells. how do i get the system to put 'a' and 'b' in the first two cells and to produce no undefined cells? thanks,

Re: How to test result of an extraction?

2006-04-27 Thread D. Bolliger
Ravi Malghan am Donnerstag, 27. April 2006 19.52: Hello Ravi (please start a new thread for a new question) > Hi: I am extracting some value from $complete_event as > follows. What can I check to see if the extraction > returned a valid value? "if($_)" seems to be giving

RE: How to test result of an extraction?

2006-04-27 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Ravi Malghan wrote: > Hi: I am extracting some value from $complete_event as > follows. What can I check to see if the extraction > returned a valid value? "if($_)" seems to be giving > incorrect values. In the following statement, $srcIp > is being set to an old extra

How to test result of an extraction?

2006-04-27 Thread Ravi Malghan
Hi: I am extracting some value from $complete_event as follows. What can I check to see if the extraction returned a valid value? "if($_)" seems to be giving incorrect values. In the following statement, $srcIp is being set to an old extracted value if there is no valid value following s

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

Re: Could anyone please help with Line Extraction and Emailing Question

2004-07-16 Thread Gunnar Hjalmarsson
Sunish Kapoor wrote: Still cant figure out..and make it work.. These are my suggested changes: $hash{$fields[1]}= [$fields[0],$fields[2],$fields[3],$fields[4],$fields[5],$fields[6],$fields[7],$fields[8],$fields[9]] if ($fields[10] == "$epoch" ) ; Replace that line with: push @{ $hash{$fields[1]

Re: Could anyone please help with Line Extraction and Emailing Question

2004-07-16 Thread Sunish Kapoor
July 16, 2004 5:28 AM Subject: Re: Could anyone please help with Line Extraction and Emailing Question > Sunish Kapoor wrote: > > Today is July 16 so when script should be executed it should send > > line1, line3, line5 to Randal on [EMAIL PROTECTED] > > > > Similarly it

Re: Could anyone please help with Line Extraction and Emailing Question

2004-07-16 Thread Gunnar Hjalmarsson
Sunish Kapoor wrote: Today is July 16 so when script should be executed it should send line1, line3, line5 to Randal on [EMAIL PROTECTED] Similarly it should send line7, line9, line11 to Tom on [EMAIL PROTECTED] NOW THE PROBLEM => Though it is sending email but only line5 to Randal and line11 to

Could anyone please help with Line Extraction and Emailing Question

2004-07-16 Thread Sunish Kapoor
I have been struggling with a script but cant make it work. There are two Sales Executives called : Randal & Tom Randal's Email ID is > [EMAIL PROTECTED] Tom's Email ID is > [EMAIL PROTECTED] Below are the contents of a text file called prospects.txt You'll observe that there a

PDF content extraction

2003-09-25 Thread Pete Emerson
I've browsed CPAN. I've Googled. I'm stumped. I've successfully used PDF::Parse to get at PDF metadata. But I can't get at the content. Is there a way in perl to extract the contents of a PDF file? Last resort will be to use pdftotext or a similar converter, but if I can go native, so much the

Re: Regex extraction skipping lines

2003-07-21 Thread Wiggins d'Anconia
Jeff 'japhy' Pinyan wrote: On Jul 21, [EMAIL PROTECTED] said: system "clear"; Not terribly portable but that is ok. Neither is 'use Win32::xxx', but that's not the point. He's writing a Perl program on (and for use on) a Windows machine. How was that determined? His original script didn't have

RE: Regex extraction skipping lines

2003-07-21 Thread Jeff 'japhy' Pinyan
On Jul 21, [EMAIL PROTECTED] said: >> system "clear"; > >Not terribly portable but that is ok. Neither is 'use Win32::xxx', but that's not the point. He's writing a Perl program on (and for use on) a Windows machine. -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japh

RE: Regex extraction skipping lines

2003-07-21 Thread wiggins
On Mon, 21 Jul 2003 11:38:26 -0400, "Andrew Thomas" <[EMAIL PROTECTED]> wrote: > Of course I apologize - I had meant to include that. Here it is, the > actual script is quite long so I've pared it down some to try and isolate > the problem. T

RE: Regex extraction skipping lines

2003-07-21 Thread Andrew Thomas
Thank you. Yes indeed that does solve the issue - of course I have to escape the pipe "|" character in order to make it work, but I don't run into any of the other issues anymore. As for using the straight number variables {$1, $2, $3...} I actually will be doing much more processing work with

RE: Regex extraction skipping lines

2003-07-21 Thread Jeff 'japhy' Pinyan
On Jul 21, Andrew Thomas said: >Of course I apologize - I had meant to include that. Here it is, the >actual script is quite long so I've pared it down some to try and isolate >the problem. This is the whole script now and it is still having the same >problem. But the person (I think) you're

RE: Regex extraction skipping lines

2003-07-21 Thread Tara Calishain
At 11:38 AM 7/21/2003, Andrew Thomas wrote: >Of course I apologize - I had meant to include that. Here it is, the actual >script is quite long so I've pared it down some to try and isolate the problem. This >is the whole script now and it is still having the same problem. I'm the most newbi

RE: Regex extraction skipping lines

2003-07-21 Thread Andrew Thomas
Of course I apologize - I had meant to include that. Here it is, the actual script is quite long so I've pared it down some to try and isolate the problem. This is the whole script now and it is still having the same problem. Text file is ~2800 lines like the following: Lastname, Firstname

RE: Regex extraction skipping lines

2003-07-18 Thread Mark Anderson
> Anyone have any ideas about this - is there a common mistake I might be > making here? > > I am using a simple regex to extract a few pieces of every line of a 2000+ > line text file then spitting it back into a second text file. I can't figure > out why but the output file always includes every

Re: Regex extraction skipping lines

2003-07-18 Thread Rob Dixon
Andrew Thomas wrote: > Anyone have any ideas about this - is there a common mistake I > might be making here? > > I am using a simple regex to extract a few pieces of every line of > a 2000+ line text file then spitting it back into a second text > file. I can't figure out why but the output file a

Regex extraction skipping lines

2003-07-18 Thread Andrew Thomas
Anyone have any ideas about this - is there a common mistake I might be making here? I am using a simple regex to extract a few pieces of every line of a 2000+ line text file then spitting it back into a second text file. I can't figure out why but the output file always includes every other li

Re: Data extraction from text file (overwhelmed newbie) (0/1)

2002-11-07 Thread Philip Neukom
On Thu, 07 Nov 2002 12:25:12 -0800, [EMAIL PROTECTED] (John W. Krahn) wrote: Thank you very much John. >> My file is ~350MB. (not attached of course) >> It has the structure as shown in the attachment [OrderSample.txt]. >> I have also attached an example of what the data should look like in >

Re: Data extraction from text file (overwhelmed newbie) (0/1)

2002-11-07 Thread John W. Krahn
Philip Neukom wrote: > > Hi! Hello, > I have a huge print file in txt format that I would like to extract > data from, export to a new text file and then import into a database. > I am less concerned about efficiency as I am with getting this done > quick and dirty. That's fine, that is one of

Data extraction from text file (overwhelmed newbie) (1/1)

2002-11-07 Thread Philip Neukom
begin 644 OrderSampleFinished.txt M*C$)4%=#+U!(5R!#55-43TU%4@DJ,S`W,#D)9&5S8W)I<'1I;VXQ"41E

Data extraction from text file (overwhelmed newbie) (0/1)

2002-11-07 Thread Philip Neukom
Hi! I have a huge print file in txt format that I would like to extract data from, export to a new text file and then import into a database. I am less concerned about efficiency as I am with getting this done quick and dirty. I am just starting out and am confused as hell. As the multitude of wa

Re: regex and ip address extraction

2002-09-20 Thread Dharmender Rai
try out (\d+\.){3}(\d+) but it won't take CIDR addresses and will not check the validity of the addresses. --- Griggs Rob <[EMAIL PROTECTED]> wrote: > Hi Guys, > > The code below extracts an ip address from the > /var/log/maillog file in the > event of the line containing the words "rej

Re: regex and ip address extraction

2002-09-19 Thread John W. Krahn
Griggs Rob wrote: > > Hi Guys, Hello, > The code below extracts an ip address from the /var/log/maillog file in the > event of the line containing the words "reject=550". It works fine, but is > there a way of shortening that regular expression? You can save six characters by removing the '$_

RE: regex and ip address extraction

2002-09-19 Thread Griggs Rob
[EMAIL PROTECTED]] > Sent: 19 September 2002 18:36 > To: [EMAIL PROTECTED] > Subject: Re: regex and ip address extraction > > > Griggs Rob wrote: > > > Hi Guys, > > > > The code below extracts an ip address from the > /var/log/maillog file in > > the e

Re: regex and ip address extraction

2002-09-19 Thread david
Griggs Rob wrote: > Hi Guys, > > The code below extracts an ip address from the /var/log/maillog file in > the event of the line containing the words "reject=550". It works fine, > but is there a way of shortening that regular expression? > > open(LOG,"/var/log/maillog"); > > while() {

RE: regex and ip address extraction

2002-09-19 Thread nkuipers
/\[(\d+\.\d+\.\d+\.\d+)\]/ hmmm...maybe this? /\[((?:\d+\.){3}\d+)\]/ #non-capturing parens group for {3}, nested in $1 parens -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

regex and ip address extraction

2002-09-19 Thread Griggs Rob
Hi Guys, The code below extracts an ip address from the /var/log/maillog file in the event of the line containing the words "reject=550". It works fine, but is there a way of shortening that regular expression? open(LOG,"/var/log/maillog"); while() { chomp;

RE: string extraction

2002-07-26 Thread David . Wagner
[mailto:[EMAIL PROTECTED]] Sent: Friday, July 26, 2002 06:56 To: [EMAIL PROTECTED] Subject: string extraction Hi guys, For example, I have the following string, how I can extract it so I have the following: notAfter=Nov 16 23:59:59 2002 GMT Month = Nov Date = 16 Time=23 Year=2002 Zone=GMT I

RE: extraction of filenames in a string

2002-03-26 Thread David Gray
> > I have a string for example: > > > > "directory/subdirectory/subsubdirectory/filename.gz" > > > > How do I extract the filename.gz part for testing, > > the number of subdirectories is not fixed? > > use File::Basename; > > my $file = "directory/subdirectory/filename.gz"; > print basename($

Re: extraction of filenames in a string

2002-03-26 Thread Jonathan E. Paton
> I have a string for example: > > "directory/subdirectory/subsubdirectory/filename.gz" > > How do I extract the filename.gz part for testing, > the number of subdirectories is not fixed? use File::Basename; my $file = "directory/subdirectory/filename.gz"; print basename($file); Jonathan Paton

extraction of filenames in a string

2002-03-26 Thread stephen . redding
Hi i have a string for example "directory/subdirectory/subsubdirectory/filename.gz" how do i extract the filename.gz part for testing, the number of subdirectories is not fixed? Stephen Redding BT Ignite Solutions Telephone - 0113 237 3393 Fax - 0113 244 1413 Email - [EMAIL PROTECTED] British

Re: split and extraction

2002-01-30 Thread John W. Krahn
Dhiraj P Nilange wrote: > > Hi there Hello, > I want to extract some word after space from some string. > Somebody from the mailing list had given me above > command. > > suppose I wanto extract 8th word... Perl arrays are indexed starting at zero (0) so the eighth word in an array would be i

RE: split and extraction

2002-01-30 Thread Jonathan E. Paton
> I want to extract some word after space from some string. > Somebody from the mailing list had given me above > command. > [snip] > but it doesnt work. If I use some array in the split > function like:- > > @array=split(/\s+/,$abc); > print $array[8]; > > this way it works. But I dont want t

RE: split and extraction

2002-01-30 Thread Hanson, Robert
you use below (the one that works). Rob -Original Message- From: Dhiraj P Nilange [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 10:19 AM To: [EMAIL PROTECTED] Subject: split and extraction Hi there I want to extract some word after space from some string. Somebody from th

RE: split and extraction

2002-01-30 Thread Nikola Janceski
n for [$#_]. -Original Message- From: Dhiraj P Nilange [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 10:19 AM To: [EMAIL PROTECTED] Subject: split and extraction Hi there I want to extract some word after space from some string. Somebody from the mailing list had given me

split and extraction

2002-01-30 Thread Dhiraj P Nilange
Hi there I want to extract some word after space from some string. Somebody from the mailing list had given me above command. suppose I wanto extract 8th word... #suppose $abc has the string; $abc=split[/\s+/]->[8]; #somebody told me like this. but it doesnt work. if i use some array in th

Re: regexp extraction

2001-12-13 Thread Birgit Kellner
--On Mittwoch, 12. Dezember 2001 14:24 +0100 Andrea Holstein <[EMAIL PROTECTED]> wrote: > I think the problem isn't the regexp, it's in the line: > > my $content = qq| > > You used the qq| ... | notation which is equivalent to " ... ". > So there's interpolation and for especially \2 could be in

Re: regexp extraction

2001-12-12 Thread Andrea Holstein
Birgit Kellner wrote: > > I have an html file and would like to extract image file names and > extensions: > > my $content = qq| > aölkjd oiae lkajf lksjfkjs df src="http://wlaskjfd.sdlkj/sdlk/LKJ_slkdjf_lkdjfslkj.gif";>|; > > Image file names may contain numers, letters or underscores. > > my

regexp extraction

2001-12-11 Thread birgit kellner
I have an html file and would like to extract image file names and extensions: my $content = qq| aölkjd oiae lkajf lksjfkjs dfhttp://wlaskjfd.sdlkj/sdlk/LKJ_slkdjf_lkdjfslkj.gif";>|; Image file names may contain numers, letters or underscores. my %imageextension; while ($content =~ //g) {

Re: extraction

2001-10-02 Thread _brian_d_foy
In article <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>, COLLINEAU wrote: > The finding lines are like that: "gqgfqsgdkg< a > href="rdn?oiddsfhlhfdsrub=lhfdlhg" class sljdfsgkjfd" > I only want to extract the underlined string. How can i do to stop th

extraction

2001-10-02 Thread COLLINEAU Franck FTRD/DMI/TAM
I have wrote the following code: while() { print TEMP "$1\n" if(m/(< a href=\"\/rdn\?oid.*rub); } The finding lines are like that: "gqgfqsgdkg< a href="rdn?oiddsfhlhfdsrub=lhfdlhg" class sljdfsgkjfd" I only want to extract the underlined st

Extraction

2001-10-01 Thread COLLINEAU Franck FTRD/DMI/TAM
Hi! I have in a HTML file some lines like: Apple Expo renaît sur le Net Comparatif des fournisseurs d'accès : Wanadoo reprend son titre I would like to extract the strings: "

Sub String extraction

2001-08-01 Thread Rajeev Rumale
Hello everybody, I need some help I am working on a searching and extarction secipt, where i need to extract information from HTML and XML files. Its simple I need to find some know tags and gett the information enclosed between them. I faced with a problem when there are multiple ocurances of s