This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Beginning Java and the fly likes Replacing Strings with characters, any functions in java that can do this job Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Replacing Strings with characters, any functions in java that can do this job" Watch "Replacing Strings with characters, any functions in java that can do this job" New topic
Author

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

Bhasker Reddy
Ranch Hand

Joined: Jun 13, 2000
Posts: 176
Is there any function in JAva that i can use
to replace
%3C with <
%/*%3C with <
%3E with >
%2F with /
%0D%0A with


Bhasker Reddy
Tony Alicea
Desperado
Sheriff

Joined: Jan 30, 2000
Posts: 3222
    
    5
This is not a JSP question so I am moving it to the beginner forum.


Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
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?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Replacing Strings with characters, any functions in java that can do this job