This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes quick syntax question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "quick syntax question" Watch "quick syntax question" New topic

quick syntax question

Ronald Whalen
Ranch Hand

Joined: Mar 27, 2001
Posts: 38
i am trying to print this statement out to a webpage.
out.println(" var filterOut1=/\D/;");

I want it to appear exaclty as is on the webpage. Unfortuntely I am getting the following error message:
Invalid string literal, cannot contain character '\?'

Any thoughts?

Ronald Whalen
Beksy Kurian
Ranch Hand

Joined: Jul 11, 2001
Posts: 254
Try this
out.println(" var filterOut1=/\\D/;");
Ronald Whalen
Ranch Hand

Joined: Mar 27, 2001
Posts: 38
jQuery in Action, 2nd edition
subject: quick syntax question
Similar Threads
insert multi language
ProJavaFX examples
Regarding login into a webpage using java code ?
weblogic portlet
using string value as a variable name