File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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
I agree. Here's the link:
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