cancel
Showing results for 
Search instead for 
Did you mean: 

Split at different dilimiters or spaces of a string

priya_ramani
Participant
0 Kudos

Hi Team,

I have a string(VAKEY) which can have 4 or 5 or 6 words and i want to capture the 4th word from that string.

in the above VAKEY the words are seperated by spaces , it can be seperated by 2 spaces or 3 spaces or 4 spaces.

I want to split the VAKEY into lv_v1 , lv_v2 , lv_v3 etc..

In the above pic I want 4th word 065-0004 from that total VAKEY string.

Note: Sometimes 4th word value may not come also , as you can observe in the first line
can you guide me to do so.

Thanks,

Priya Ramani.

Sandra_Rossi
Active Contributor
0 Kudos

This is specifically a field which you should not SPLIT, but instead you should cast or move to a structure with components of the right number of characters. Tomas has given a link to another discussion which provides example codes.

View Entire Topic
arifarifoglu1
Discoverer

You can split intto table and delete Space rows and read the row with index 4

priya_ramani
Participant
0 Kudos

Hi @arifarifoglu

SPLIT AT SPACE is not working as it does not have fixed spaces between words.

Ex:
Priya_123 Priya233 Priya432 priya74938

It has string like above , SPLIT AT Space is not working. Because it has more than spaces in between words.

priya_ramani
Participant
0 Kudos

@arifarifoglu Thanks,
I tried this and its spliting into table.