re.sub 'expected string or bytes-like object'

Create issue
Issue #381 new
Former user created an issue

I wanted to replace certain word by using empty ''. I used to code as such line to remove certain words using re.sub()

text = re.sub(r'@[A-Za-z0-9]+', '', text)

But now, the latest RE cant work anymore like this, given the error as:

expected string or bytes-like object

Is there any alternatives for this?

Comments (1)

  1. Log in to comment