Finding capitalized words: Difference between revisions

From XPUB & Lens-Based wiki
(Created page with "<source lang="python"> import re pat = re.compile(r"\b[A-Z]+\b") print pat.findall(text) </source>")
 
No edit summary
 
Line 4: Line 4:
print pat.findall(text)
print pat.findall(text)
</source>
</source>
[[Category:Regex]]

Latest revision as of 12:48, 17 November 2011

import re
pat = re.compile(r"\b[A-Z]+\b")
print pat.findall(text)