in reply to Re: Re: Re: Re: Re: conditional match in regex
in thread conditional match in regex
The problem seems to be stated: either $val or <val>:
  p
$ perl -le'$_=pop;/([\$@*%]|(<))(.*)(?(2)>)/;print"($1)($3)"' '$xyz' ($)(xyz) $ perl -le'$_=pop;/([\$@*%]|(<))(.*)(?(2)>)/;print"($1)($3)"' '$xyz>' ($)(xyz>) $ perl -le'$_=pop;/([\$@*%]|(<))(.*)(?(2)>)/;print"($1)($3)"' '<xyz>' (<)(xyz)
  p
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: Re: Re: Re: Re: conditional match in regex
by jryan (Vicar) on Nov 06, 2002 at 16:19 UTC | |
by petral (Curate) on Nov 06, 2002 at 16:46 UTC |
In Section
Seekers of Perl Wisdom