cancel
Showing results for 
Search instead for 
Did you mean: 

Can't Split('|')

mecha_viper
Champ in-the-making
Champ in-the-making
can we really not use | for splitting?
I've been debugging my code for the whole day not knowing why it does not work
until I found out the error was splitting with |  it works in w3school.. why not in alfresco?
2 REPLIES 2

rjohnson
Star Contributor
Star Contributor
If you are trying to do this in a webscript then it will be because Rhino does not support it. Javascript on the server is run using Rhino which is a very old version of Javascript with a few anomalies.

That said, I am very surprised that you cannot split on |

Have you tested this in Javascript Console?

mechaviper
Champ in-the-making
Champ in-the-making
this was my old account. I resolved this by replacing | with #
and then split it with #. I find it weird that it could split with others but not with |