- (setq lst '("PS_2_PW" "DDD-1" "DIE_1_PW" "PS_PW"
- "PH_PW" "DIE_PW" "PH_1_PW" "DIE_2_PW"
- "DDD-34" "PS_1_PW"
- )
- )
- (setq lst< '("DIE" "PS" "PH"))
- (foreach abc lst
- (or (vl-position
- t
- (mapcar
- '(lambda (x) (wcmatch abc (strcat x "*")))
- lst<
- )
- )
- (setq lst2 (cons abc lst2))
- )
- )
- (append
- (apply
- 'append
- (mapcar
- '(lambda (a / l)
- (if (setq l (vl-remove-if-not
- '(lambda (b) (wcmatch b (strcat a "*")))
- lst
- )
- )
- (vl-sort l
- '(lambda (c d / an)
- (setq an (+ (strlen a) 2))
- (< (atoi (substr c an 1)) (atoi (substr d an 1)))
- )
- )
- )
- )
- lst<
- )
- )
- (reverse lst2)
- )
|