• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Replacing Strings with characters, any functions in java that can do this job

 
Bhasker Reddy
Ranch Hand
Posts: 176
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any function in JAva that i can use
to replace
%3C with <
%/*%3C with <
%3E with >
%2F with /
%0D%0A with
 
Tony Alicea
Desperado
Sheriff
Posts: 3226
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is not a JSP question so I am moving it to the beginner forum.
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where is the original String coming from? An input file? A String from a TextComponent?
Also - just to be clear, when you run into the 3 characters %3C together you always want them replaced by the single character <, is that correct?
Also - are all Strings to be replaced started with a % character?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic