To make a String display in different paragraphs

Hi,

I need to display a very long String which I pull from database in different paragraphs on the web page. The string contains pipes in between. If there is one pipe in the string, I need one break and if 2 pipes, I need 2 breaks in the html page.

Can somebody suggest me a way please

Thanks

[319 byte] By [slata] at [2007-10-3 3:18:47]
# 1
You use a element to make breaks in an HTML page.
DrClapa at 2007-7-14 21:10:36 > top of Java-index,Java Essentials,New To Java...
# 2
I am not sure what you really want, but use java.util.StringTokenizer to decompose your string (use | as separator) and then display tokens as paragraphs.HTH,Peter
sk.petera at 2007-7-14 21:10:36 > top of Java-index,Java Essentials,New To Java...
# 3
[nobr]StringTokenizer won't work; it will treat two or more consecutive pipes as one delimiter. Use regexes instead: str = str.replaceAll("\\|", "<br>");[/nobr]
uncle_alicea at 2007-7-14 21:10:36 > top of Java-index,Java Essentials,New To Java...
# 4
Thanks a lot. str.replaceAll("\\|", "");worked
slata at 2007-7-14 21:10:36 > top of Java-index,Java Essentials,New To Java...