Re: Help with extracting text

2004-01-02 Thread John W. Krahn
Zary Necheva wrote: > > Hi everyone, Hello, > How can I extract the text before the first occurrence of dot (.) or > single space from the first field. > > This is my file > > LB1571 5TH .W43 1993|text1|text1| > FICT. V.12|text2|text2| > FICT.|text3|text3| > HQ806 .B35 1995|text4|text4| > G53

Re: Help with extracting text

2003-12-31 Thread Rob Dixon
Deb wrote: > > I need help understanding why I'm getting this complaint, > > Use of uninitialized value in concatenation (.) or string at test.pl line 2. > > It says its unitialized, but isn't the my $status initializing the scalar? > I'm so confused. > > Here's the code: > > > #!/usr/local/bin/per

Re: Help with extracting text

2003-12-31 Thread William Martell
ginal Message - From: "Rob Dixon" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, December 31, 2003 9:57 AM Subject: Re: Help with extracting text > Zary Necheva wrote: > > > > How can I extract the text before the first occurrence of dot (.)

Re: Help with extracting text

2003-12-31 Thread Rob Dixon
Zary Necheva wrote: > > How can I extract the text before the first occurrence of dot (.) or > single space from the first field. > > This is my file > > LB1571 5TH .W43 1993|text1|text1| > FICT. V.12|text2|text2| > FICT.|text3|text3| > HQ806 .B35 1995|text4|text4| > G530.T6B4941988Q|text5|text5|

RE: : Help with extracting text

2003-12-31 Thread Halkyard, Jim
AIL PROTECTED] Sent: 31 December 2003 14:33 To: [EMAIL PROTECTED]; Zary Necheva Subject: RE:: Help with extracting text Hi Zary, I have attached a sample file with the data you offered and a perl script which can be copied and pasted into the command line on win32. Let me know if you have any p

RE:: Help with extracting text

2003-12-31 Thread William Martell
Hi Zary, I have attached a sample file with the data you offered and a perl script which can be copied and pasted into the command line on win32. Let me know if you have any problems. HTH, Will Martell Dallas Texas LB1571 5TH .W43 1993|text1|text1| FICT. V.12|text2|text2| FICT.|text3|text3| HQ80

Re: Help with extracting text

2003-12-30 Thread drieux
On Dec 30, 2003, at 1:35 PM, Zary Necheva wrote: [..] How can I extract the text before the first occurrence of dot (.) or single space from the first field. This is my file LB1571 5TH .W43 1993|text1|text1| FICT. V.12|text2|text2| FICT.|text3|text3| HQ806 .B35 1995|text4|text4| G530.T6B4941988Q|

Help with extracting text

2003-12-30 Thread Zary Necheva
Hi everyone, How can I extract the text before the first occurrence of dot (.) or single space from the first field. This is my file LB1571 5TH .W43 1993|text1|text1| FICT. V.12|text2|text2| FICT.|text3|text3| HQ806 .B35 1995|text4|text4| G530.T6B4941988Q|text5|text5| MPCD11 .B42 P27|text6|text

Re: Help with extracting text file

2003-11-25 Thread John W. Krahn
Zary Necheva wrote: > > Hi everyone, Hello, > I have a file with data similar to this > .. > Ex|FEx|NQxx|OUxx|GExx|OVxxx|IQ|OR > Ex|FExx|NQxx|GExxx|OVxx|OUxx|IQxxx|ORxxx > Ex|FExxx|NQxx|OUxx|OVxxx|ORx

Re: Help with extracting text file

2003-11-25 Thread Rob Dixon
Rob Dixon wrote: > > use strict; > use warnings; > > open INFILE, 'myfile.txt' or die $!; > > while () { > chomp; > my @fields = split /\|/; > my @output = grep /^(E|FE|NQ|IQ)/, @fields; > print join('|', @output), "\n"; > } > > **OUTPUT > > Ex|FEx|NQxx|IQ > Ex|FExxx

Re: Help with extracting text file

2003-11-25 Thread Rob Dixon
Hi Tim. Sorry, but may I mess with your code? :) Tim Johnson wrote: > > Zary Necheva wrote: > > > > I have a file with data similar to this > > .. > > Ex|FEx|NQxx|OUxx|GExx|OVxxx|IQ|OR > > Ex|FExx|NQxx|GExxx|OVxx|OUxx|IQxxx|O

RE: Help with extracting text file

2003-11-25 Thread Tim Johnson
2003 12:45 PM To: [EMAIL PROTECTED] Subject: Help with extracting text file Hi everyone, I have a file with data similar to this .. Ex|FEx|NQxx|OUxx|GExx|OVxxx|IQ|OR Ex|FExx|NQxx|GExxx|OVxx|OUxx|IQxxx|ORxxx Ex|FE

Help with extracting text file

2003-11-25 Thread Zary Necheva
Hi everyone, I have a file with data similar to this .. Ex|FEx|NQxx|OUxx|GExx|OVxxx|IQ|OR Ex|FExx|NQxx|GExxx|OVxx|OUxx|IQxxx|ORxxx Ex|FExxx|NQxx|OUxx|OVxxx|ORxxx|IQxxx|RFxx Ex|FExx|NQxx

Re: extracting text

2003-08-09 Thread John W. Krahn
Bryan Irvine wrote: > > [EMAIL PROTECTED] wrote: > > > > Assuming there is only one set of brackets on a line, and you only > > want the IP address between them, and READLOG is an open handle to > > your log: > > > > - Not Tested - > > my @ips; > > while (my $line = ) { > >if ($line =~ /\[(.*

RE: extracting text

2003-08-05 Thread ccarver
This is what I came up with. Tested and works. #!/usr/bin/perl -w use strict; open DATA, "ips.txt"; # this is the output file with the ip list while () { if ($_ =~ /\[(\w+\.\w+\.\w+\.\w+)\]/) { print IPS "$1\n"; } } Chris Carver Pennswoods.net Mail Administrat

RE: extracting text

2003-08-04 Thread Bryan Irvine
> > Assuming there is only one set of brackets on a line, and you only want the IP > address between them, and READLOG is an open handle to your log: > > - Not Tested - > my @ips; > while (my $line = ) { >if ($line =~ /\[(.*)\]/) { > push @ips, $1; >} >else { > print STD

RE: extracting text

2003-08-04 Thread wiggins
On 04 Aug 2003 14:08:29 -0700, Bryan Irvine <[EMAIL PROTECTED]> wrote: > I'm trying to build a script to automagically black-list spammers. How > can I extract the ip address from between [ ]? > > turn this: > > Received: from 24.60.195.149 (h0

extracting text

2003-08-04 Thread Bryan Irvine
I'm trying to build a script to automagically black-list spammers. How can I extract the ip address from between [ ]? turn this: Received: from 24.60.195.149 (h00a0cce008a4.ne.client2.attbi.com [24.60.195.149]) Received: from 11.139.74.233 ([11.139.74.233]) by n7.groups.yahoo.com with NNFMP; M

RE: Extracting text from a phrase

2002-09-17 Thread Kirby_Sarah
]] Sent: Tuesday, September 17, 2002 12:09 PM To: Ian Cc: [EMAIL PROTECTED] Subject: Re: Extracting text from a phrase That's because my match isn't matching anything. It's not very forgiving and anything so much as a space or case change in the wrong place could throw it off. Ca

Re: Extracting text from a phrase

2002-09-17 Thread James Edward Gray II
That's because my match isn't matching anything. It's not very forgiving and anything so much as a space or case change in the wrong place could throw it off. Can you alter the match a little so it will catch the actual lines? James On Tuesday, September 17, 2002, at 10:58 AM, Ian wrote:

RE: Extracting text from a phrase

2002-09-17 Thread Ian
Hi, Thank you but when I try and run that by doing a Perl script.pl file.shtml >newfile.txt I am getting a blank output. Sorry if I did not explain myself correctly. There are multiple instances of this line in the one page, and I need to generate a simple text file to use for another applica

Re: Extracting text from a phrase

2002-09-17 Thread James Edward Gray II
Why not try grabbing all the important stuff right out of the pattern, like my example below. Note: Your pattern may need changes if I assumed too much, from your examples. #!/usr/bin/perl while (<>) { if (m!([^<]+)!) { print qq(); } } On Tuesday, September 17, 2002, at 10:05 AM, Ian wrote:

Extracting text from a phrase

2002-09-17 Thread Ian
Hi, Please excuse this newbie question, but I am getting confused :( I need at have a small script that will extract selected words from a phrase and then insert them into a new string. I have an html page that I need to extract both urls & keywords from and put them into a new file. Should be f

RE: extracting text

2002-07-03 Thread Timothy Johnson
-- From: Janek Schleicher [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 03, 2002 3:10 PM To: [EMAIL PROTECTED] Subject: Re: extracting text Charlie Farinella wrote at Wed, 03 Jul 2002 23:51:44 +0200: > I have the following script that prints email addresses enclosed in <> from a logf

Re: extracting text

2002-07-03 Thread Janek Schleicher
Charlie Farinella wrote at Wed, 03 Jul 2002 23:51:44 +0200: > I have the following script that prints email addresses enclosed in <> from a >logfile. It works > by removing everything up to and including the bracket on the left, and then doing >the same on the > right. I would like to be able

extracting text

2002-07-03 Thread Charlie Farinella
I have the following script that prints email addresses enclosed in <> from a logfile. It works by removing everything up to and including the bracket on the left, and then doing the same on the right. I would like to be able to just extract the text between the brackets. I have been unable to

Re: help with extracting text from a string

2002-02-15 Thread Jenda Krynicky
From: Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> > On Feb 14, Bill Akins said: > > >I have a string that is read in and assigned to a veriable. String > >looks something like this: 10.00 c$cpi c$ul (Sample Number:) c$sh > >/Courier 0 c$fnt ( SA-01-0C8A8) c$sh ( ) c$sh /Courie

Re: help with extracting text from a string

2002-02-14 Thread Jeff 'japhy' Pinyan
On Feb 14, Bill Akins said: >I have a string that is read in and assigned to a veriable. String >looks something like this: >10.00 c$cpi c$ul (Sample Number:) c$sh /Courier 0 c$fnt ( >SA-01-0C8A8) c$sh ( ) c$sh /Courier 0 c$fnt > >I need the string between the second set of ()'s. There may

help with extracting text from a string

2002-02-14 Thread Bill Akins
Hi all, I have a string that is read in and assigned to a veriable. String looks something like this: 10.00 c$cpi c$ul (Sample Number:) c$sh /Courier 0 c$fnt ( SA-01-0C8A8) c$sh ( ) c$sh /Courier 0 c$fnt I need the string between the second set of ()'s. There may or may not be a leading s