How to copy the text which change everytime

HI I have to copy the name from sap.
It has first name and last name. If the name is like; chirag singh then I can copy it on the basis of space.
If I have name like; chirag singh chauhan. Then how to fetch the last name?
Any leads will be appreciate?

try get text activity, hope that helps