How to remove only symbols from string in dart
up vote 1 down vote favorite I want to remove all special symbols from string and have only words in string I tried this but it gives same output only main() String s = "Hello, world! i am 'foo'"; print(s.replaceAll(new RegExp('W+'),'')); output : Hello, world! i am 'foo' expected : Hello world i am foo regex dart flutter share | improve this question edited Nov 10 at 15:03 CopsOnRoad 2,197 1 9 17 asked Nov 10 at 13:59 ketiwu 20 4 add a comment | up vote 1 down vote favorite I want to remove all special symbols from string and have only words in string I tried this but it gives same output only main() String s = "Hello, world! i am 'foo'"; print(s.replaceAll(new RegExp('W+'),'')); output : Hello, world! i am 'foo' expected : Hello world i am foo regex dart flutter share | improve this question edited Nov 10 at ...