简体   繁体   English

有没有办法从字符串(\\ u0410)中删除特殊字符?

[英]Is there a way to remove special characters from a string (\u0410)?

I'm trying to clean a string but I'm having problems removing the special characters.我正在尝试清理字符串,但是在删除特殊字符时遇到了问题。 The lower case and removing \\n is already taken care小写字母和删除\\ n已经被注意

my_string = "\u0410\u041d\u041e\u0422\u0410\u0426\u0418\u042f: \n* Lectures \u2013 20 hours \n* Workshops \u2013 8 hours (these workshops are so designed as to provoke active student participation;"

Expected out:预期输出:

"lectures 20 hours workshops 8 hours these workshops are so designed as to provoke active student participation"

Is there a way to remove all special characters (\А, etc...)?有没有办法删除所有特殊字符(\\ u0410等)?

I'm trying to clean a string but I'm having problems removing the special characters.我正在尝试清理字符串,但是在删除特殊字符时遇到了问题。 The lower case and removing \\n is already taken care小写字母和删除\\ n已经被注意

my_string = "\u0410\u041d\u041e\u0422\u0410\u0426\u0418\u042f: \n* Lectures \u2013 20 hours \n* Workshops \u2013 8 hours (these workshops are so designed as to provoke active student participation;"

Expected out:预期输出:

"lectures 20 hours workshops 8 hours these workshops are so designed as to provoke active student participation"

Is there a way to remove all special characters (\А, etc...)?有没有办法删除所有特殊字符(\\ u0410等)?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM