Python regex replacing \u2022

前端 未结 4 1163
死守一世寂寞
死守一世寂寞 2021-01-26 09:53

This is my string:

raw_list = u\'Software Engineer with a huge passion for new and innovative products. Experienced gained from working in both big and fast-grow         


        
4条回答
  •  孤独总比滥情好
    2021-01-26 10:31

    This is my approach, changing regex pattern, you might try

    re.sub(r'[^\x00-\x7F]+','',raw_list)
    

    Out[1]: u'Software Engineer with a huge passion for new and innovative products. Experienced gained from working in both big and fast-growing start-ups. Specialties Languages and Frameworks: JavaScript (Nodejs, React), Android, Ruby on Rails 4, iOS (Swift) Databases: Mongodb, Postgresql, MySQL, Redis Testing Frameworks: Mocha, Rspec xxxx Others: Sphinx, MemCached, Chef.'

提交回复
热议问题