-5

I am getting a result of "kjhvkjkasdfkjh@grouping@group_group.12018-08-20".

I am looking to split the string in java to only get the "2018-08-20".

Any suggestions? The part I want is always at the end.

1 Answers1

1
String sample = "kjhvkjkasdfkjh@grouping@group_group.12018-08-20"
int SubstringStart = sample.length() - 10;
String outputsample = sample.substring(SubstringStart);

will break if string has length shorter than 10

shiftas
  • 268
  • 2
  • 8