Using velocity split() to split a string into an array doesnt seem to work

前端 未结 5 1739
猫巷女王i
猫巷女王i 2021-01-11 12:17

I HATE velocity and rarely ever use it but sometimes I am called upon at my job to do so. I can never really figure out just how to use it.

I have this



        
5条回答
  •  终归单人心
    2021-01-11 12:57

    Apparently even though the velocity documentation says that the delimiter is a string it's really a regular expression. Thanks apache.

    proper way is

    $product.product.split("\|");
    

提交回复
热议问题