in reply to Searching for regular expression overlaps

I agree with LanX. Even if this is possible, it is the wrong solution, whatever the problem.

  1. Using regex, rather than wildcards for matching filenames is like using a bazooka to swat flies.

    See glob, File::Glob, File::BSDGlob etc.

  2. In general, rule-based processing is hierarchical.

    That is, earlier rules 'override' later ones.

    Ie. the last rule is a catch-all: *.*; the preceding level is: *.txt, *.exe, *.png etc.; the level before that is: th_*.png etc.; and the top level are individual files: xyz.exe, th_qpr.png.

If you describe the problem you need to solve -- rather than the problem with your failed solution -- you'll likely get better answers.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
In the absence of evidence, opinion is indistinguishable from prejudice.
  • Comment on Re: Searching for regular expression overlaps