I have a large set of real-world text that I need to pull words out of to input into a spell checker. I\'d like to extract as many meaningful words as possible with
Sample code
print re.search(ur'(?u)ривет\b', ur'Привет') print re.search(ur'(?u)\bривет\b', ur'Привет')
or
s = ur"abcd ААБВ" import re rx1 = re.compile(ur"(?u)АБВ") rx2 = re.compile(ur"(?u)АБВ\b") rx3 = re.compile(ur"(?u)\bАБВ\b") print rx1.findall(s) print rx2.findall(s) print rx3.findall(s)