Log messages

Hi I want to split some text
Suppose I am Vital this text I want to split into two components

put firstname split by “Vital” into Lastname
Log Last name
the result will be like (I am)

So,I dont want this brackets ,I want the log like - I am

Please suggest…

The split by operator will always give you a list of values (even if it happens to be a list of just one value, as in your case). There are a couple of ways to get what you want:

put item 1 of (firstname split by "Vital") into Lastname

Or, if you want to put several parts of a line into different variables, you can do something like this:

put aLine split by "Vital" into (firstname, lastname, more...)