• Post Reply Bookmark Topic Watch Topic
  • New Topic

Pipe Seperated file using Scanner  RSS feed

 
Kedar Kulkarni
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello I am trying to parse a pipe separated line using Scanner. It does not seem to work. It tokenizes every character. Can some one give me some clues?

?
 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The pipe symbol has special meaning in a regex -- so you need to escape it.

Henry
 
Kedar Kulkarni
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
cool this works!! thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!