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|

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
This is a pretty classic example of where split and join come in handy. Here I'm reading each line, splitting it into fields by the pipe character, then creating a new array with only those fields that begin with the letters I specify. Then I use join to make a string with those fields I chos

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