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
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
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 (.)
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|
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
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
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|
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
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
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
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
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
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
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 =~ /\[(.*
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
>
> 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
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
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
]]
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
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:
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
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:
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
--
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
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
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
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
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
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
29 matches
Mail list logo