Quantcast
Channel: What is the correct way to use unicode characters in a python regex - Stack Overflow
Browsing all 3 articles
Browse latest View live

Answer by Nozar Safari for What is the correct way to use unicode characters...

i have same problem, i know this in not efficient way but in my case worked result = re.sub(r"\\" ,",x,x",result) result = re.sub(r",x,xu00ad" ,"",result) result = re.sub(r",x,xu" ,"\\u",result)

View Article


Answer by Bohemian for What is the correct way to use unicode characters in a...

Rather than seek out specific unwanted chars, you could remove everything not wanted:re.sub('[^\\s!-~]', '', my_str)This throws away all characters not:whitespace (spaces, tabs, newlines, etc)printable...

View Article

What is the correct way to use unicode characters in a python regex

In the process of scraping some documents using Python 2.7, I've run into some annoying page separators, which I've decided to remove. The separators use some funky characters. I already asked one...

View Article
Browsing all 3 articles
Browse latest View live




<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>