# simplecamelcase.py - a really simplistic CamelCase parser
import re
pattern = re.compile(r'''
    (?x)(   # Begin group
    \b      # word boundry
    [A-Z]   # Find an upper case letter
    (\S*?)  # consume non whitespace
    [A-Z]   # Find a second upper case letter
    (\S*?)  # consume more non whitespace
    \b      # end word boundry
    )       # end group, repeat as neccesary
    ''')
testString = "This is a TestCase of a VerySimple CamelCaseParser."
find_camel = lambda s: [u[0] for u in re.findall(pattern, s)]
print find_camel(testString)
# Prints ['TestCase', 'VerySimple', 'CamelCaseParser']