txt <- " 9PM 8-Oct-2014_0.335kwh "txt <- sub("[\\s_]+", "", txt, perl = TRUE)txt
Standard input is empty
[1] "9PM 8-Oct-2014_0.335kwh "
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!