Hi,
one solution in the UI would be to use Recode to achieve what you are aiming for.
Right click on your column header -> Recode -> right click on the red triangle under new value -> Advanced -> extract segment

You can find the JSL code in the log and it is using the word function:
/*:
// Recode column: Column 1 2
Local( {dt, col1},
dt = Data Table( "Test table" );
dt << Begin Data Update;
col1 = dt << New Column( dt:Column 1 );
col1 << Set Name( "Column 1 2" );
dt << Move Selected Columns( {col1}, after( dt:Column 1 ) );
For Each Row(
dt,
col1[] = Word(
[3 4],
dt:Column 1,
Get Whitespace Characters() ||
Get Punctuation Characters( Exclude Chars( "'-" ) ) || "_",
Unmatched( dt:Column 1 )
)
);
dt << End Data Update;
Hope this helps.
Jonas