Error when using Java String split

Posted by Dan Howard on Stack Overflow See other posts from Stack Overflow or by Dan Howard
Published on 2010-03-31T23:06:34Z Indexed on 2010/03/31 23:13 UTC
Read the original article Hit count: 384

Filed under:
|

HI All,

I've been using the basic split for a while - where I just parse out a string into an array based on a simple token like " " or ",".

So of course a customer tries this: \\.br\ which fails miserably.

I need to parse to an array of lines. The string for example looks like this:

"LINE 1\\.br\\LINE 2\\.br\\LINE 3\\.br\\LINE 4\\.br\\"

and this fails with java.util.regex.PatternSyntaxException: Unexpected internal error.

Any ideas?

© Stack Overflow or respective owner

Related posts about java

Related posts about regex