With just String Function Calls that would be:
FirstInitial = substring(InputString, 0, 1)
LastSpacePosition = findLast(InputString, ' ')
SecondInitial = substring(InputString, LastSpacePosition + 1, 1)
Output = FirstInitial + SecondInitial
or in one piece
substring($Person/Name, 0, 1) + substring($Person/Name, findLast($Person/Name, ' ') + 1, 1)
Try the RegexReplaceAll java function in the CommunityCommons module. As needleRegex, use:
(.).*\b(.).*
And as replacement, use:
$1$2
This will remember the first character as $1 and the first character after the last word boundary as $2.
Input: John Fitzgerald Kennedy
Output: JK