please I want to know how to delete whitespaces from the end of string in dart . ex :
String name ="( Sana . Harun )";
when I use this code
print(sana.replaceAll(new RegExp(r"\s+\b|\b\s"),""));
it just delete from the beggining and not from the end , and print Like this :(Sana.Harun ) .. there is a space between Harun and ) . I want to delete the space between Harun and )
Can any one help me , please ?

+after the\b\sin the RegExp. As written, it only removes one space, not all the spaces after a word break.