How to split ' or "?

Hi,

How to split ’ or " ??

I wonder why ‘str.split("’“c)(0)','Split(str,”‘")’ isn’t working.

I need your help.

Thanks,

Hi @boogi0472,

What does the string you’re trying to split look like? I think split needs at least one character which is why ‘’ wouldn’t work.

1 Like

Hi,

Can you try the following?

resultStringArray = str.Split({"'"c,""""c})

Regards,

3 Likes

Hi, @Yoichi

I tried it but it didn’t split…:joy:

str = asfdasfasdfasdf’1111/2222/3333’sdafasdafasfdsa
str.Split({“'“c,””""c})(0)
output: asfdasfasdfasdf’1111/2222/3333’sdafasdafasfdsa

I want 1111/2222/3333…
How to get it?

Thanks,

Hi,@jcastro

str = asfdasfasdfasdf’1111/2222/3333’sdafasdafasfdsa
or str = asfdasfasdfasdf"1111/2222/3333"sdafasdafasfdsa

I want 1111/2222/3333…
How to get it?

Thanks,

Hi,

In my environment, the following works good.

str="asfdasfasdfasdf’1111/2222/3333’sdafasdafasfdsa"
str.Split({"’“c,”"""c})(1)

In this forum, single quote and double quote are automatically replace like ' to .
Can you check your characters in Split argument is same as one in original strings?

Regards,

4 Likes

I solved it!

Thanks, @Yoichi :slight_smile:

Have a nice day!

1 Like

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