Java - How to split a string on plus signs?

Posted by John Manak on Stack Overflow See other posts from Stack Overflow or by John Manak
Published on 2010-02-04T08:59:55Z Indexed on 2010/04/02 21:23 UTC
Read the original article Hit count: 145

Filed under:
|
|
|

Hi! I was trying to split an arithmetic expression (eg "1+2+10+15") on the plus signs. However, I didn't manage to write the appropriate regular expression. I thought this would work:

expression.split("\\+");

but it doesn't. Do you know the correct solution?

© Stack Overflow or respective owner

Related posts about java

Related posts about split