I have a string as below which gets added from right side and need to fetch the last words every time I ran in my script automatically.

```
string='apple:v1 banana:v3 pineapple:v3'

```

Now I want output as `v3` in this case but I have this string not static it gets always added from right side like:

```
string='apple:v1 banana:v3 pineapple:v3 mango:v4 strawberry:v5'

```

Here the output ought to be `v5`.

Now we have cut command in shell where we can fetch as

```
myoutput="(echo "$string" | cut -d ':' -f5)

```

to `v5` do we have any command or argument more where i can use to get the latest added vx details whenever my string gets added with new output.