Be careful with layout tabs that host wildcard chars, e.g. "Layout#1", lest ssget fail to retrieve entities as intended.
(defun _Tame ( text / wild )
( (lambda ( lst nfg / result )
(vl-list->string
(foreach x (reverse lst)
(setq result
(if (member x nfg)
(vl-list* 96 x result)
(cons x result)
)
)
)
)
)
(vl-string->list text)
(vl-string->list "#@.*?~[]-,")
)
)
Usage:
(setq nerd1
(ssget "_X"
(list
'(0 . "INSERT")
'(2 . "tic*,sw")
(cons 410 (_Tame (getvar 'ctab)))
)
)
)
FWIW, Cheers.
Edit: Embedded wildcards and the impact upon ssget is not limited to layout names -- can effect anything with a name: layers, blocks, text styles yada ... but for some reason layout names are prone to the malady more than others (in my experience), ergo my intrusion.