# Tim Hatch -- thatch@google.com
# hands you regex?
# https://github.com/google/sre_yield
import sys
sys.path.append('/Users/thatch/code/sre_yield_thatch')
import sre_yield
reload(sre_yield)
v = sre_yield.AllStrings('storage-(testing|current|next)|ad(spam)?')
len(v) # yep, it looks like a sequence
list(v) # explicitly, for printing
'storage-testing' in v
'storage-foo' in v
# I actually found another use, for checking bigraphs for presidents!
# From http://xkcd.com/1313/
print ' '.join(sre_yield.AllStrings('bu|[rn]t|[coy]e|[mtg]a|j|iso|n[hl]|[ae]d|lev|sh|[lnd]i|[po]o|ls'))