Using the getMatch() method in Perl5Util

[email protected] Fri, 14 Jun 2002 09:54:04 +0100
Newsgroups gmane.comp.jakarta.oro.user
Message-ID <AFFFAD29E63CD411A5EF00A0C9956510050E797E@sanexmbcr04.sandwich.pfizer.com>
Hi,

My name is Andrew Yates & I am new to this mailing list. I have a question
concerning using getMatch(). I am trying to run a regular expression to
extract XGHTYUY from the following text in a file:

>XGHTYUY  Random 589 "Random item"

Using the regular expression ($line =~ /<^>)(.+?\b)/) I can extract the
required section by using $2. However I don't seem to be able to carry this
function out in the ORO implementation of regular expressions. Is there an
interface available for doing this or is this just a feature of perl?

I am aware that I could solve the problem by using a substring method on the
outputted String class but I would like to be able to find out how to do
this properly for future reference.

Thanks in advance,

Andrew Yates

     LEGAL NOTICE
     
     Unless expressly stated otherwise, this message is confidential and
     may be privileged. It is intended for the addressee(s) only. Access to 
     this e-mail by anyone else is unauthorised. If you are not an 
     addressee, any disclosure or copying of the contents of this e-mail or 
     any action taken (or not taken) in reliance on it is unauthorised and 
     may be unlawful. If you are not an addressee, please inform the sender 
     immediately.
     
     Pfizer Limited is registered in England under No. 526209 with its 
     registered office at Ramsgate Road, Sandwich, Kent CT13 9NJ  



----------------------------------------------------------------
This message and any attachment has been virus checked by
Pfizer Corporate Information Technology, Sandwich.
----------------------------------------------------------------