Re: Perl split() question (OT)...

2004-07-26 Thread Mathias Samuelson
Steve Bertrand wrote: > Perl hackers -- Figured someone would have a reasonably quick, easy answer > for this: > > I am trying to read through a file, line-by-line, and I want to extract > the text in between the [ and ] characters. I would normally half the line > by split() - ing the line first

Re: Perl split() question (OT)...

2004-07-23 Thread Steve Bertrand
> On Fri, 23 Jul 2004, Steve Bertrand wrote: > >> Perl hackers -- Figured someone would have a reasonably quick, easy >> answer >> for this: >> >> I am trying to read through a file, line-by-line, and I want to extract >> the text in between the [ and ] characters. > > This is a job for..captur

RE: Perl split() question (OT)...

2004-07-23 Thread Carmichael, Lee
Convert the /[/ to /\[/ and see if that works. Generally brackets mean a character class in perl regexs. You could also use single quotes. E.g. split('[', $line). Good luck, Lee > -Original Message- > From: Steve Bertrand [mailto:[EMAIL PROTECTED] > Sent: Friday, July 23, 2004 10:32 AM >

Re: Perl split() question (OT)...

2004-07-23 Thread Fernando Gleiser
On Fri, 23 Jul 2004, Steve Bertrand wrote: > Perl hackers -- Figured someone would have a reasonably quick, easy answer > for this: > > I am trying to read through a file, line-by-line, and I want to extract > the text in between the [ and ] characters. This is a job for..capturing parens!!!