matching a string to extract substrings for which some function returns true
khemkaamit at gmail.com
Tue Nov 22 12:27:41 CET 2005
say you have some string: "['a', 'b', 1], foobar ['d', 4, ('a', 'e')]"
Now i want to extract all substrings for which
"isinstance(eval(substr), list)" is "True" .
now one way is to walk through the whole sample string and check the
was wondering if there is any smarter way of doing the same, may be
Endless the world's turn, endless the sun's spinning
Endless the quest;
I turn again, back to my own beginning,
And here, find rest.
More information about the Python-list