Re: Help required to extract multiple text fields from a text string

2012-05-27 Thread Shlomi Fish
Hi Paul, On Sat, 26 May 2012 20:26:14 -0700 Adams Paul adams...@msn.com wrote: Sent from my LG phone Why have you already sent 4 messages to this mailing list, which contain nothing except this Sent from my LG phone notice and the entire replied-to message quoted below (with only a plain

Re: Help required to extract multiple text fields from a text string

2012-05-27 Thread Shawn H Corey
On 12-05-27 02:00 AM, Shlomi Fish wrote: On Sat, 26 May 2012 20:26:14 -0700 Adams Pauladams...@msn.com wrote: Sent from my LG phone Why have you already sent 4 messages to this mailing list, which contain nothing except this Sent from my LG phone notice and the entire replied-to message

Re: Help required to extract multiple text fields from a text string

2012-05-27 Thread Michael Rasmussen
On Sat, May 26, 2012 at 05:52:19PM +0100, Rob Dixon wrote: On 26/05/2012 14:07, pa...@fsmail.net wrote: From: Rob Dixonrob.di...@gmx.com On 26/05/2012 13:51, pa...@fsmail.net wrote: split is slower than the correct regex matching. That is complete nonsense. Can you show a benchmark that

Re: Help required to extract multiple text fields from a text string

2012-05-27 Thread John W. Krahn
Michael Rasmussen wrote: On Sat, May 26, 2012 at 05:52:19PM +0100, Rob Dixon wrote: On 26/05/2012 14:07, pa...@fsmail.net wrote: From: Rob Dixonrob.di...@gmx.com On 26/05/2012 13:51, pa...@fsmail.net wrote: split is slower than the correct regex matching. That is complete nonsense. Can

Re: Help required to extract multiple text fields from a text string

2012-05-27 Thread Michael Rasmussen
On Sun, May 27, 2012 at 07:24:26PM -0700, John W. Krahn wrote: Michael Rasmussen wrote: [ a bunch of blather, snipped here ] The regular expression is not splitting! It is capturing. split removes whitespace. The regular expression captures non-whitespace. So the two expressions posted

RE: Help required to extract multiple text fields from a text string

2012-05-26 Thread Christopher Gray
...@talktalk.net To: beginners@perl.org Cc: Subject: Help required to extract multiple text fields from a text string Good day, I have a text file containing records. While I can extract single sub-strings, I cannot extract multiple sub-strings. The records are of multiple types - only

Re: Help required to extract multiple text fields from a text string

2012-05-26 Thread timothy adigun
Hi Chris, On Sat, May 26, 2012 at 8:14 AM, Christopher Gray christopher.g...@talktalk.net wrote: Hi, Thank you for looking to help me. Unfortunately, when I used your code nothing was extracted. At least when I printed $1 nothing appeared. In order to help me learn more about Perl - I'd

Re: Help required to extract multiple text fields from a text string

2012-05-26 Thread Dr.Ruud
On 2012-05-25 22:51, Christopher Gray wrote: I have a text file containing records. While I can extract single sub-strings, I cannot extract multiple sub-strings. Try split, see perldoc -f split. while ( my $line= $fh_in ) { my @data= split ' ', $line; ; } --

Re: Help required to extract multiple text fields from a text string

2012-05-26 Thread pangj
split is slower than the correct regex matching. Message Received: May 26 2012, 10:59 AM From: Dr.Ruud rvtol+use...@isolution.nl To: beginners@perl.org Cc: Subject: Re: Help required to extract multiple text fields from a text string On 2012-05

Re: Help required to extract multiple text fields from a text string

2012-05-26 Thread Rob Dixon
On 26/05/2012 13:51, pa...@fsmail.net wrote: split is slower than the correct regex matching. That is complete nonsense. Can you show a benchmark that supports your claim? Rob -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org

Re: Help required to extract multiple text fields from a text string

2012-05-26 Thread pangj
to extract multiple text fields from a text string On 26/05/2012 13:51, pa...@fsmail.net wrote: split is slower than the correct regex matching. That is complete nonsense. Can you show a benchmark that supports your claim? Rob -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org

Re: Help required to extract multiple text fields from a text string

2012-05-26 Thread Rob Dixon
On 25/05/2012 21:51, Christopher Gray wrote: Good day, I have a text file containing records. While I can extract single sub-strings, I cannot extract multiple sub-strings. The records are of multiple types - only about a third of which have the data I need. An example of a good record is

Re: Help required to extract multiple text fields from a text string

2012-05-26 Thread Jim Gibson
On May 26, 2012, at 5:51 AM, pa...@fsmail.net wrote: split is slower than the correct regex matching. Did you know that split uses a regular expression to find the separators on which to split the string? So your claim is unlikely to be true. In any case, the difference between using split

Re: Help required to extract multiple text fields from a text string

2012-05-26 Thread Rob Dixon
On 26/05/2012 14:07, pa...@fsmail.net wrote: From: Rob Dixonrob.di...@gmx.com On 26/05/2012 13:51, pa...@fsmail.net wrote: split is slower than the correct regex matching. That is complete nonsense. Can you show a benchmark that supports your claim? There are many cases prove that, I am

RE: Help required to extract multiple text fields from a text string

2012-05-26 Thread Christopher Gray
Brilliant - a first class teach-in. Many thanks for the description - it all works. Brilliant. -Original Message- From: Rob Dixon [mailto:rob.di...@gmx.com] Sent: 26 May 2012 2:13 PM To: beginners@perl.org Cc: Christopher Gray Subject: Re: Help required to extract multiple text fields

Re: Help required to extract multiple text fields from a text string

2012-05-26 Thread Chris Charley
Christopher Gray wrote in message news Good day, I have a text file containing records. While I can extract single sub-strings, I cannot extract multiple sub-strings. The records are of multiple types - only about a third of which have the data I need. An example of a good record is

Re: Help required to extract multiple text fields from a text string

2012-05-26 Thread Adams Paul
Sent from my LG phone Jim Gibson jimsgib...@gmail.com wrote: On May 26, 2012, at 5:51 AM, pa...@fsmail.net wrote: split is slower than the correct regex matching. Did you know that split uses a regular expression to find the separators on which to split the string? So your claim is

Help required to extract multiple text fields from a text string

2012-05-25 Thread Christopher Gray
Good day, I have a text file containing records. While I can extract single sub-strings, I cannot extract multiple sub-strings. The records are of multiple types - only about a third of which have the data I need. An example of a good record is Abc1234 STATUS open DESCRIPTION A basket of

RE: Help required to extract multiple text fields from a text string

2012-05-25 Thread pangj
: Subject: Help required to extract multiple text fields from a text string Good day, I have a text file containing records. While I can extract single sub-strings, I cannot extract multiple sub-strings. The records are of multiple types - only about a third of which have the data I need

Re: Help required to extract multiple text fields from a text string

2012-05-25 Thread timothy adigun
: Christopher Gray christopher.g...@talktalk.net To: beginners@perl.org Cc: Subject: Help required to extract multiple text fields from a text string Good day, I have a text file containing records. While I can extract single sub-strings, I cannot extract multiple sub-strings