How to spilt a variable with double spacing?

My variable line : Nationality space space Chinese. I would like to obtain string of “Chinese”. How should I spilt them and store as a new variable?
image
Note: there is double spacing!

Perhaps you can write the raw data to excel and then use ‘text to columns’ feature of UiPath for excel using doublespace as separator

1 Like

@_itslw
give a try on stringVar.Split({" "},StringSplitOptions.RemoveEmptyEntries)(1)
grafik

2 Likes

Yes it works. Thank you so much for helping! I have another question if my variable line is "Name of new company: (Space) 1.(Space) Art Private Limited. I would to obtain the line after 1. which is Art Private Limited. Could u suggest to me which method I could use?

image @ppr

@_itslw
Maybe Regex would better help with anchoring on Number Dot and using groups
grafik
grafik

1 Like

Ok but how do I change the output I get from the regex into a string? It’s currently stored as image .How do I changed it into a string variable? I am going to input this variable string into my excel file.

Have a look here for working with Regex

2 Likes

Alright, thank you so much! @ppr

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