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!

Remove Duplicates from String Array with Regular Expressions

807589Sep 10 2008 — edited Sep 12 2008
I want to be able to use the Java regular expressions to eliminate duplicates from a string array. I also need to retain the order of the items.

For example:

(1,1,1,5,5,3)


Should return

{1,5,3}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 10 2008
Added on Sep 10 2008
18 comments
1,454 views