Use of the glob function as suggested by kejohm also gets around the problem with the regex /\\*?.txt/ that the . (dot) is a metacharacter that matches anything (except, in the absence of the /s modifier, a newline). To match only a literal '.' character, the regex /\\*?\.txt/ would be better.
In reply to Re^2: Strange Error
by AnomalousMonk
in thread Strange Error
by JimboMcDeans
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |