[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Split with regex and group not working

The following code doesn't work:

           .split().tokenize("\n|\r\n", true, 100, true)

It tries to reinsert the token between the lines without taking into account that the token is a regex string.

The follow code in the GroupTokenIterator is the culprit:

            // include token in between
            if (data != null && count > 0 && token != null) {

The contents of this email and any attachments are confidential, may be privileged and may only be read and used by the named recipient(s). If you have received it in error please contact the sender immediately and delete the e-mail. We endeavour to exclude viruses from our emails, but it is your responsibility to check this email for viruses. ITQ Business Solutions (Pty) Ltd accepts no liability or responsibility of whatsoever nature for any failure or loss arising in any way from the use of email as a means of communication.