Code Red => AutoLISP (Vanilla / Visual) => Topic started by: vincent.r on December 05, 2019, 10:18:58 AM
Title: How to wildcard search in string list
Post by: vincent.r on December 05, 2019, 10:18:58 AM
Hi folks,
I do have string list, ("beam_gl" "beam_fl" "beam_sl" "beam_tl" "ele_gl" "ele_fl" "ele_sl" "ele_tl" "column_gl" .....) I want to extract all "ele_*" items with their position in list, but not able to get it. I tried with mapcar, lambda, vl-string-search . Any help will be highly appreciable.
Title: Re: How to wildcard search in string list
Post by: ribarm on December 05, 2019, 10:34:34 AM
I used ribarm's solution, it is generating just a list of positions and it is simple to handle for me. One iteration version for my learning and future reference. Thanks again guys. Really appreciated your efforts.
Title: Re: How to wildcard search in string list
Post by: Lee Mac on December 06, 2019, 09:06:50 AM
If you just require a list of zero-based indexes, here are three variants: