I just started working with perl today and have been doing some work with regular expressions, and have run into something of a snag. I want to find a pattern that I dont know what it will be, I know that the end will relate to the begining, and even know the relationship but dont know what the begining is. Example $test = "XYZCBA", where X coresponds to C, Y to B, and Z to A, I know that I can do
if ($test =~ /(.{3})/1/g)
do something;
but I want to do /1 =~ tr/ZYX/ABC;
or something along those lines, I know it could be done with a context free language, I also know that a Perl regular expression can do more then a regular, regular expression, but I dont know how to do this in perl. Thanks for the help.
if ($test =~ /(.{3})/1/g)
do something;
but I want to do /1 =~ tr/ZYX/ABC;
or something along those lines, I know it could be done with a context free language, I also know that a Perl regular expression can do more then a regular, regular expression, but I dont know how to do this in perl. Thanks for the help.