Solved

Escape special characters in Java

Posted on 2007-03-30
2
1,916 Views
Last Modified: 2008-01-09
Hi,

I forming a string with a lot of characters that I need to escape, for example


String newStr = new String("\Hi, """ This is \\//complex string");

What I'm looking is there a function I can call to escape the the string automaticlly?

thanks.
0
Comment
Question by:yarock
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 18823958
Which ones?
0
 
LVL 11

Accepted Solution

by:
Manish earned 500 total points
ID: 18824106
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
jsp login check 12 62
Html Table Looping (part 2) 5 39
netbeans can not run self signed app 8 37
Java import explained 4 47
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Suggested Courses

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question