Skip to content

Instantly share code, notes, and snippets.

@sagorbrur
Created September 26, 2019 07:17
Show Gist options
  • Select an option

  • Save sagorbrur/d7f8b7526a6c86bb4b24fbc2c16f8c3c to your computer and use it in GitHub Desktop.

Select an option

Save sagorbrur/d7f8b7526a6c86bb4b24fbc2c16f8c3c to your computer and use it in GitHub Desktop.
# Removing english word from non english document
import re
doc = """
নতুন করে কিছু english শব্দ নিয়ে সমস্যা তৈরি হয়েছে। বাক্যের মধ্যে এই English শব্দ খুবেই বিরক্তির উদ্রেক করছে।
Just figure out to remove these words
"""
import re
result = re.sub(r'[A-Za-z]', '', doc)
print(result)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment