How to use " as a string split delimiter

Hi guys!

How can I use " as a string split delimiter?

Basically I’m trying to do this: mail.From.ToString.Split(""".ToCharArray)(0).ToString
and it’s giving me an error.

I also tried ’ " ’ as found in another topic, but without any success …

Thanks in advance.

1 Like

Hey @jcab,

You need to use mail.ToString.Split("""".ToCharArray)(0).ToString
(4 quotation marks instead of 3)

A double quote can be escaped by preceding it with another. So “” as your string tells UiPath that you’re not trying to end the string you’re trying to literally use the character ".

3 Likes

I also tried with four " as you suggested, before opening this topic and it also did not work…
Are you sure it works?

Main.xaml (6.3 KB)

Here is what I have working.

If you still cannot get it to work sharing your xaml file would be helpful, thanks!

1 Like

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