s = "10/30/2015 09:00:00"sub("^\\S+\\s+(\\d+):(\\d+).*$","\\1\\2", s)
Standard input is empty
[1] "0900"
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!