String functions

Hi .I have String like as Mendix Rapid .I want output like MR..if I add another word to that  string  output will be M and first  charcter of the last word .means Mendix Rapid Developer output will be MD.How can do this     thanks in advance 
2 answers

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:


And as replacement, use:


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