Split Address String without break in words

I have to pass an Address string in Excel file limit by 30 characters each line into a web form which has 3 columns.
Sample String “BLOCK A 311, JLN CUEPACS 5, TMN MEWAH, CHERAS 43000 KAJANG”

If i do a string split at 30 characters it will end up like this:

BLOCK A 311, JLN CUEPACS 5, TM
N MEWAH, CHERAS 43000 KAJANG

I have spent half a day searching on the net but only found codes in programming languages and have no idea on how to integrate them into UIPath. Sorry but my programming skill level is almost at zero.

Any help is much appreciated.

Hi,

Do you want to split by comma?
If so, the following helps you.

The regex pattern is "(?<=^| ).{1,30}(,|$)" or "(?<=^| ).{1,29}(,|$)"

Sequence3.xaml (5.6 KB)

Regards,

1 Like

Hello @MKF_Motor_Sdn_Bhd - Welcome to the UiPath Forums community :partying_face:

Further to @Yoichi’s post,

You can use Regex to match a pattern of text anywhere in a string.

If you want to learn Regex from scratch (like me) - check out my Regex MegaPost for new users

Hopefully this helps you understand Regex a little more :blush:

Thanks, i tried between comma and space and it works perfectly!
Many thanks again!

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.