Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to split a string delimitted by vertical bar(|)

807603Sep 1 2006 — edited Nov 9 2007
Hi
I would like to split a string delimitted by verticl bar using String.split("|") functionality. When I used split functionality for other delimitters like "-" or ":" or ";" it worked perfectly but if I use vertical bar it is splitting all the individual characters in thet string
Is it because verical bar is having some significance in regular expressions

Can some body please shed light on this
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 7 2007
Added on Sep 1 2006
9 comments
3,990 views