-1
我想分割一个字符串使用JSTL方法,并分裂它的基础上四个报价''''
。以下是详细内容:JSTL拆分方法无法正常工作?
example = ''''THE FAMOUS DIAMONDS''''This is second string for the example''''/content/dam/rcq/mp_push_tank_style.jpg''''right''''
${fn:split(example,\"''''\")}
example[0]=THE FAMOUS DIAMONDS
example[1]=This is second string for the example
example[2]=/content/dam/abc/tank.jpg
example[3]=right
基于上述字符串它工作正常,但问题是,每当他们在我的字符串'(single quote)
和它的功能GET休息。下面是示例
example = ''''THE FAMOUS DIAMONDS''''This is string's contains single quote''''/content/dam/rcq/mp_push_tank_style.jpg''''right''''
${fn:split(example,\"''''\")}
example[0]=THE FAMOUS DIAMONDS
example[1]=This is string
example[2]=s contains single quote
example[3]=/content/dam/abc/tank.jpg
现在,您将看到示例[2]包含文本而不是图像路径。
任何人都可以帮忙,因为我不能改变拆分类型''''
。
在此先感谢