def mob = '919892122165' def a = mob[mob.length()-10..mob.length()-1]println aprintln a[0..3]
Standard input is empty
9892122165 9892
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!