Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

" problems

 
m ferguson
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am writing a program that allows me to remove a line from an xml document.. easy enough but the line I wish to remove has a ".

Pattern p = Pattern.compile("<TYPE fileData COMPUTER"file.txt">");

how do I write the line above so the two enclosed "" are not are read as text
 
Tom Johnson
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does \" work? Thats how you do it if you want to print " anyway :

 
m ferguson
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks!!! that sorted it
 
Tom Johnson
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic