I want to select specific substring from the input string:

```
String i = "example/test/foo-foo";

```

How to get only the substring `foo-foo` as a new string?

Expected output:

```
String newString = "foo-foo";

```