本帖最后由 飞雪神光 于 2024-2-29 16:24 编辑
这是一种写法 去掉不包含关键字的第四个元素 保留该表
 - (defun del-lst-nth(num oldlist)
- (setq num (1+ num))
- (vl-remove-if'(lambda (x) (zerop (setq num (1- num))))oldlist)
- )
- (setq jzwsjnew
- (mapcar
- '(lambda (x)
- (if
- (and
- (null (wcmatch (nth 3 x) "*隧洞进口"))
- (null (wcmatch (nth 3 x) "*隧洞出口"))
- )
- (del-lst-nth 3 x)
- x
- )
- )
- jzwsj
- )
- )
|