📜  颤振从字符串中删除字符 - Dart 代码示例

📅  最后修改于: 2022-03-11 14:48:08.354000             🧑  作者: Mango

代码示例2
The docs for the RegExp class state that you should use raw strings (a string literal prefixed with an r, like r"Hello world") if you're constructing a regular expression that way. This is particularly necessary where you're using escapes.

In addition, your regex is going to catch spaces as well, so you'll need to modify that. You can use RegExp(r"[^\s\w]") instead - that matches any character that's not whitespace or a word character