a re problem
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

a re problem

From: cheng <magicmas@spymac.com>
Date: Sat May 28 2005 - 07:56:56 CEST

hi,all, i try to replace every target word found in the text

 for target in splitText:
        if stopwords.find(target) >= 0 :
            text = re.sub(r'\b%s\b','',text) &target

when i using the statment:

text = re.sub(r'\b%s\b','',text) &target

 get error : unsupported operand type(s) for &: 'str' and 'str'

is it some idea that can modity it and make it work?
Received on Thu Sep 29 16:15:24 2005