Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-01-2007, 04:33 PM
Member
 
Join Date: Jul 2007
Posts: 2
renjan is on a distinguished road
How to remove Control Characters from an input file?
I want to remove Control Characters from a file which is in the form of a string
I have a code but that is showing errors while executing

// The pattern matches control characters
Pattern p = Pattern.compile("{cntrl}");
Matcher m = p.matcher("");
m.reset(NmlFile);

//Replaces control characters with an empty string.
String result = m.replaceAll("");

where 'NmlFile' is the input file which is a string. Here the error is coming from the first line ie from 'compile("{cntrl}")' field. Please help.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Taking input from Properties File bugger New To Java 4 05-07-2008 10:30 AM
How to call the input value from different file? xiongling Networking 6 04-07-2008 11:05 AM
writing and reading unicode characters from a file ranoosh Advanced Java 0 02-08-2008 03:53 AM
How to detect USB device drives & set/remove file attributes sharafat Advanced Java 0 01-20-2008 07:07 AM
count character in text file as input file aNNuur New To Java 0 06-18-2007 07:46 AM


All times are GMT +3. The time now is 04:48 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org