text="stack overflow... is a popular website."gsub("[[:space:]]*(\\.+)[[:space:]]*", " \\1 ", text)
Standard input is empty
[1] "stack overflow ... is a popular website . "
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!