import re opts = re.searchAll('/D/') # opts =