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!

Java Split() without delimiter. Split every 4 characters

807605Jul 11 2007 — edited Jul 11 2007
Hello!

I am trying to use the split funtion to split a string that contains no delimiter.

The string is:

00f1002100410076000700a700c700f1

and I need the output to be:

00f1 0021 0041 0076 0007 00a7 00c7 00f1

As you can see, the string needs to be split after every 4 characters.

Thanks a lot in advance people!!!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 8 2007
Added on Jul 11 2007
8 comments
5,566 views