• Post Reply Bookmark Topic Watch Topic
  • New Topic

beginner's problems with split()  RSS feed

 
John Losty
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the code:



the output:


What am I doing wrong?
 
Knute Snortum
Sheriff
Posts: 4287
127
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
")" is a meta character in a regex. It needs to be escaped like "\)". But since Java Strings also use escaped characters, it needs a double backslash, like "\\)".
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!