Answers for "flutter remove character from string"

1

flutter remove character from string

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
Posted by: Guest on March-03-2021

Code answers related to "flutter remove character from string"

Browse Popular Code Answers by Language