I've spent a good amount of hours trying to solve this one but without success. I have an alist with strings
(setq trees '(("pine" . "cones") ("oak" . "acorns") ("maple" . "seeds")))
and I want to obtain the assoc
of it using a regexp as key. That is
(assoc ".ine" trees)
always returns nil
instead of ("pine" . "cones")
. I've tried to use the assoc-default function instead, using string-match but it also did not work. I know that this is pretty basic, but I cannot really understand what I am doing wrong. Thank you in advance.
elisp
. Your question is about using Elisp to accomplish something; it's not a question about the nature of the language (e.g. compared to other Lisps).