• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

simple String question

 
Nikos Stavros
Ranch Hand
Posts: 243
Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, there

say I wanted to change a String "I'm" in to "I\'m"

would I use this


that doesn't seem to work.
 
Balasubramanian Chandrasekaran
Ranch Hand
Posts: 215
Firefox Browser Linux VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This one will do the trick

 
Nikos Stavros
Ranch Hand
Posts: 243
Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks mate nice and helpful!

Merry Xmas
 
bart zagers
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, the behavior is mentioned in the Javadoc.
Apparently, the backslash and the $-sign have a special meaning and you have to do it like:
 
Balasubramanian Chandrasekaran
Ranch Hand
Posts: 215
Firefox Browser Linux VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by bart zagers:
Well, the behavior is mentioned in the Javadoc.
Apparently, the backslash and the $-sign have a special meaning and you have to do it like:


Thanks Bart thats quite interesting.
 
Nikos Stavros
Ranch Hand
Posts: 243
Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I should read more Javadoc!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic