Extract Last Word  💬🥉 

Fatme KungyovaFatme Kungyova Experian Employee
edited August 17 in Functions Library

Extract Last Word Version I


This function extracts the last word in a string, in which all words are separated by space.

If the string contains of only one word, it returns the word as it is received in the input removing any starting space.

The function can handle space before the word. If in the input there is a single word, which has a space in front, the space will be removed! Similarly, if there is any punctuation before or after the word, it will be removed, leaving only the last word in the result.


How to use the function?

You can use the function in a Transform step, giving the column or value you require as a parameter. The output is a string that does not contain any punctuation!

Find the attached DMX file, which can be imported into Data Studio!


What does the function contain?


These are examples of how the function work and the output that would be expected!


 

Compatibility:

This function is compatible with all instances of Data Studio from v2.6.3 onwards.

 

Extract Last Word Version II

This version is the same as Version I, however, it returns punctuation if there is any surrounding the last word.

To use it download this dmx file and import it to the chosen Space in Aperture Data Studio.


These are examples of how the second version of the Extract Last function works.

 


Compatibility:

This function is compatible with all instances of Data Studio from v2.6.3 onwards.

Sign In or Register to comment.