cancel
Showing results for 
Search instead for 
Did you mean: 

Split text by length

DilipK
Level 3
Hi Team,

I am trying to split the text based upon some certain count(lets assume as 5) 

Input parameter:

The input [test]: 36444      36481      3650136588      36601 (Please note there are some spaces in between)

Maximum Line Length: 5

outpu parametert:
Split Lines : collection


Outcome is :Empty spaces are not considered. It is considering only the values in it.

1)36444
2)36481
3)36501
4)36588
5)
36601


Expectation is : Empty spaces should also be considered in output collection
1)36444
2)
3)36481
4)
5)36501
6)36588
7)
😎
36601

Do we have any way to overcome this?

Thank you!

Regards,
Dilip K

1 BEST ANSWER

Best Answers

PeterLacken
Level 7
Hi,

try a 'custom escape' - replace all of the spaces with another character before the Split

Replace(text, " ", "-")

then when you have a collection as expected put back the space by replacing the "-" with " ".

peter

------------------------------
PeterLacken
Ren Røros Intelligent Automation
Peter.Lacken@renroros.no
http://www.rria.no
------------------------------

View answer in original post

3 REPLIES 3

FredLi1
Level 2
Basically, we can leverage the build-in function Left, Right and Len to do string split. 

Please check the attachment.

------------------------------
Fred Li
AS
Pacific/Apia
------------------------------

PeterLacken
Level 7
Hi,

try a 'custom escape' - replace all of the spaces with another character before the Split

Replace(text, " ", "-")

then when you have a collection as expected put back the space by replacing the "-" with " ".

peter

------------------------------
PeterLacken
Ren Røros Intelligent Automation
Peter.Lacken@renroros.no
http://www.rria.no
------------------------------

Hi Fred,

I have a problem. Can you help me please.

The input
Yıl:2020

Donem:3
Varyant:MAR.2020  DURUS

The Result Collection
Yıl        Donem    Varyant
2020    3               MAR.2020  DURUS



------------------------------
Halil KOC
------------------------------