in reply to Re: Matching condition for two files
in thread Matching condition for two files
Assuming the differing letter and digit will always be in the same positions...
The character set \w also matches digits and _ (underscore). A more specific character set is [[:alpha:]] (the set of all alphabetic characters), or [[:upper:]] if you know the letter will always be upper-case. Also, heed the advice of CountZero concerning anchoring the ends of the match and file name extensions.
See Character Classes and other Special Escapes in perlre, and Posix Character Classes in perlrecharclass.
|
|---|