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
> 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
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
>
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!!!