On 15.06.18 19:39, René J.V. Bertin wrote:
Is there a way to write a single glob regexp that expands to all lib*.dylib
EXCLUDING lib*.[0-9]*.dylib, lib*.[0-9]*.[0-9]*.dylib, etc? I think the
excluded list could be obtained by lib*.[0-9.]*.dylib (assuming the dot isn't a
wildcard here), is there a better way to get at the list I want than to do 2
globs and then a list exclusion operation?
with tcl 8.6, one can do the following
set excludePattern {lib*.[0-9]*.dylib}
set files [glob -tails -dir /opt/local/lib *.dylib]
set excludedFiles [lmap f $files {if {[regexp $excludePattern $f]} continue;
set f}]
The exclude pattern can contains certainly "|" for alternate exclude patterns,
etc.
all the best
-gn