Splitting string doesn't work as expected

Hello there, I want to split a String, the string is the following:

ExtractedText = “82 Habitaciones privadas”
totalCuartos = ExtractedText.Split(" "c).First

I know that totalCuartos gives only the number. But when debugging it throws an error, because it doesn’t split the space between the number and the string, just the last one. I tried this in the immediate panel


I copied, pasted the symbol at position 2, but now doesn’t split last space
As you can see, this doesn’t make any sense, unless the spaces are different, but I don’t know such thing. How could I split all the string?

Thanks in advance!!


There might be some whitespace except character code 0x20.
Can you try the following expression?



@Dev_Dav - if you have notepad++ you can check the HEX value of that character to make sure where it is x20 …


Hi there!
That actually worked, but using RegEx Wizard with the (\s)+ expression. I don’t know how to execute that code in the actual workflow, but many thanks!!


I do have notepad++ but I don’t know how to do that :frowning: sorry


We can use it with Assign activity as the following, FYI.



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