[Israel.pm] match second

Gabor Szabo szabgab at gmail.com
Wed Jun 21 06:06:06 PDT 2006


On 6/21/06, Tal Kelrich <tal at musicgenome.com> wrote:
> On Wed, 21 Jun 2006 15:32:50 +0300
> "Ernst, Yehuda" <yernst at nds.com> wrote:
>
> > Thanks!
> >
> > What do i have to do if i want to get the text from the second match
> > to the end of line?
> you can use $' ($POSTMATCH), see perldoc perlvar

which is not really recommended, especially if there are many regex executions
A better way would be to use @+ (see perldoc perlvar)
or to put (.*)  at the end of your regex and then use $3 or whatever
appropriate.

Gabor



More information about the Perl mailing list