I need to right a regular expression that will find a X length string at the begining and a string of the same lenght at the end of a pattern, (also similar circumstances in the midle) I know the length of the patterns at the end but not the middle, and I know how they relate to each other, I also know that there can be one miss (IE if there are 4 characters only 3 have to follow the pattern)
I was thinking of something like
/(.{4})(\1 =~ tr/something/somethingelse/)/)
but that doesnt work, or running a subroutine on \1 or $1 like
/(.{4})(trans (\1))/ or $1, please help
also there can be one miss on each group and it still has to find it, is it even possible to do this?