[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
match regexp to list elements
From: |
evan |
Subject: |
match regexp to list elements |
Date: |
Wed, 08 Dec 2010 15:09:34 -0000 |
User-agent: |
G2/1.0 |
Hi all, I want to locate all elements of a list that match a regexp.
Say I want to write the function match-list-regexp such as if
my-list = '(a1 b2 a3 b4)
then
(match-list-regexp "a[0-9]" my-list)
should give '(0 2)
I though I could use function string-match but I need a way of
converting the elements of a list into strings. Any ideas?
Thanks.
Evan.
- match regexp to list elements,
evan <=