Regex - how to capture many words
Question: I have a simple regex question:

Given a string like `"test-class"` what regex should I use to get
`['test','class']` (in python context)


Answer: You don't need a regex; just use
[`str.split()`](http://docs.python.org/2/library/stdtypes.html#str.split):

    
    
    >>> 'test-class'.split('-')
    ['test', 'class']
    

A regex solution is still to split:

    
    
    >>> import re
    >>> re.split(r'-', 'test-class')
    ['test', 'class']
    

