File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Removing specific line from code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Removing specific line from code" Watch "Removing specific line from code" New topic

Removing specific line from code

ron ray chaudhuri

Joined: Aug 27, 2003
Posts: 7
Hi All,

I am trying to write an Ant task for removing a specific method call from Javascript files.

I presume I would have to use Java for this, but since I'm having to use Jdk 1.3, I cannot use the java.util.regex for my purpose. Can anyone suggest, how I could actually achieve what I want to do?

Thanks in advance,
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63529

Since your question seems to be more about how to write the Java to do this rather than how to make the Ant task out of the Java, I'm moving this to the Java in General(intermediate) forum.

[Asking smart questions] [About Bear] [Books by Bear]
Ian Darwin
Ranch Hand

Joined: Aug 03, 2001
Posts: 64
In the First Edition of the Java Cookbook, I used one of the free Apache Regular Expression packages to explain regexes. I think any of these would work with Java 1.3. See and look for either ORO or Regular Expressions.


Ian Darwin
Many questions are answered in my Java Cookbook, 2nd Edition
ron ray chaudhuri

Joined: Aug 27, 2003
Posts: 7
HI Ian,

Thanks for your response.

I'm really a novice with regexps. Coud you give some guidance in how to use the jakarta regexp package for my purposes?

Thanks in advance,
I agree. Here's the link:
subject: Removing specific line from code
jQuery in Action, 3rd edition